TargetCpu=CURRENT

Postings relating to old VirtualBox pre-releases
Post Reply
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

TargetCpu=CURRENT

Post by socratis »

I was comparing the logs of one of my VMs between 5.0.24 and 5.1.0_RC1 and I noticed that there is a new item logged; TargetCpu=CURRENT:
CPUM: Matched host CPU INTEL 0x6/0x2a/0x7 Intel_Core7_SandyBridge with CPU DB entry 'Intel Core i7-2635QM' (INTEL 0x6/0x2a/0x7 Intel_Core7_SandyBridge)
IEM: TargetCpu=CURRENT, Microarch=Intel_Core7_SandyBridge
I actually have an Intel i7-2820QM @ 2.3MHZ, which is an Intel_Core7_SandyBridge. Great.

However, on some of my Mac VMs (10.5 up to 10.9, not 10.10 or 10.11), I have:
CPUM: Matched host CPU INTEL 0x6/0x2a/0x7 Intel_Core7_SandyBridge with CPU DB entry 'Intel Core i7-2635QM' (INTEL 0x6/0x2a/0x7 Intel_Core7_SandyBridge)
IEM: TargetCpu=CURRENT, Microarch=Intel_Core2_Penryn
I was curious why that is, and if it's always been like that, it simply wasn't exposed to the logs.

Thanks for any explanation.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: TargetCpu=CURRENT

Post by Technologov »

I'm not completely sure, but I know that Mac OS X tests the CPU it runs on, and refuses to run on future CPU.

I. e 10.5 will not run on Haswell (i7 4790K), without hacking.

Windows and Linux guests don't have this dumb anti-feature.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: TargetCpu=CURRENT

Post by socratis »

I'm not 100% sure about 10.5 (no way to verify it), but 10.6, .7, .8 and .9 will definitely run on an i7-Sandy Bridge. I'm typing this on one. So, the question is if there is a reason for this behavior? I run MacCPUID and the CPU passed to a 10.8 client (for example) shows that I'm not having a Sandy Bridge, but a Penryn architecture. Simply changing the OS property of the VM to 10.11 shows that I'm indeed running a Sandy Bridge. !?!

So the questions are:
1) Is this a new behavior or we simply hadn't noticed before?
2) Why is the throttling down necessary when it's not required?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: TargetCpu=CURRENT

Post by michaln »

socratis wrote:1) Is this a new behavior or we simply hadn't noticed before?
The behavior isn't new, the logging is.
2) Why is the throttling down necessary when it's not required?
Probably because safe is better than sorry and no one has the time to figure out exactly which CPU works with exactly which OS X release. For Sandy Bridge you may be right, for Broadwell it's not likely to be the case that it works with e.g. 10.6.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: TargetCpu=CURRENT

Post by socratis »

And I'm guessing that you guys had to include this workaround just for OSX because Apple's installers are so ... picky[1], right? Because on every other VM that I have I don't see this workaround.

Man I hate sometimes the way Apple is doing things and alienates developers...

Thanks for the info Michal.

[1]: I could use other epithets here, but I don't want a ban ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: TargetCpu=CURRENT

Post by michaln »

Apple faces the same problem as everyone else: Predicting the future is hard :) Most OS developers use a conservative approach and only use CPU features they positively detected. Apple is much more aggressive and less careful, but you might as well blame Intel for changing things around all the time.

Also, Apple is in the unique position that none of this is a problem for 99.99% of their customers who get the OS preinstalled with hardware. The rest just have to deal with it and grumble.
Post Reply