Opened 12 years ago
Closed 10 years ago
#11168 closed defect (fixed)
CPU MSRs do not return correct values
Reported by: | apianti | Owned by: | |
---|---|---|---|
Component: | VMM | Version: | VirtualBox 4.2.4 |
Keywords: | Cc: | ||
Guest type: | all | Host type: | all |
Description
I am currently testing an EFI application, the problem is that CPU MSRs such as IA32_PERF_STATUS(MSR_PERF_STATUS) and MSR_PLATFORM_INFO return incorrect, often insane values, causing the application to crash the virtual machine. IA32_PERF_STATUS always returns zero. MSR_PLATFORM_INFO returns maximum and minimum multipliers lower than the CPU can even provide. For me it returns a value of four for both, even though the TSC runs at a multiplier of 33, and Intel Sandy/Ivy bridge/Nehalem CPUs can't operate below multiplier sixteen. I have tried in multiple hosts including Windows 7, multiple flavors of Linux, and Mac OS X Lion and Mountain Lion, all provide incorrect values.
Change History (8)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
use VMWare or Hyper-V. I have the same issue with xperf in a Win8 guest:
comment:3 by , 12 years ago
Unfortunately that is not a solution as they are not free, and I'm just trying to test without having to restart constantly. I don't see why they don't all return the multiplier at which the TSC increments. There's no need to actually speedstep or turbo I just would like it to return valid values.
comment:5 by , 12 years ago
follow-up: 7 comment:6 by , 12 years ago
VMWare player as far as I can see does not allow booting from anything but a hard disk, it also doesn't support booting from EFI as I have tried booting from my iso under all guests. Also this is not for personal usage. The problem is that these registers are different based upon which CPU is being used. IA32_PERF_STATUS(15:0) should be equal to the current p-state value, I don't understand why it's being set to 1000... As for u8Multiplier it's always set to 4 for some reason, why is it not set to the actual value of MSR_PLATFORM_INFO(15:8) or IA32_PERF_STATUS(44:40), which is max bus ratio, depending on the CPU model?
comment:7 by , 12 years ago
Replying to apianti:
The problem is that these registers are different based upon which CPU is being used. IA32_PERF_STATUS(15:0) should be equal to the current p-state value, I don't understand why it's being set to 1000... As for u8Multiplier it's always set to 4 for some reason, why is it not set to the actual value of MSR_PLATFORM_INFO(15:8) or IA32_PERF_STATUS(44:40), which is max bus ratio, depending on the CPU model?
Almost always it does not make sense to mirror the exact host state into the guest. The fixed-coded values for u8Multiplier are just some default values which worked for some purposes. As I said, the implementation can be improved.
comment:8 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think we did what is appropriate in VBox 4.3.x.
Oops Nehalem cpus can't operate below multiplier seven.