Question about XEN Hypervisor MSR capability exposion to VMs
Hi All
We encountered a blue screen problem when live migrate Win8.1/Win2012R2 64bit VM from V3 processor to non-V3 processor sandbox, KVM does not has this problem.
After looking into the MSR capabilities, we found XEN hypervisor exposed bit 39 and bit 18 to the VM, from Intel manual bit 39 refers to reserve bit and should not be set, bit 18 refers to MWAIT/MONITOR capability, from my understanding it should not exposed to the VM too.
BTW, KVM does not expose bit 18/39 to the VM.
Below is the boot message:
(XEN) read msr: ecx=c0000083, msr_value=0xfffff80028ddf240 (XEN) read msr: ecx=1a0, msr_value=0x4000801889
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(XEN) write msr:msr=40000071, msr_value=0x10000000000082f (XEN) write msr:msr=40000070, msr_value=0x0
(XEN) write msr:msr=40000071, msr_value=0x20000000000082f (XEN) write msr:msr=40000070, msr_value=0x0
(XEN) read msr: ecx=17, msr_value=0x0
(XEN) write msr:msr=8b, msr_value=0x0
(XEN) read msr: ecx=8b, msr_value=0x2d00000000
Liuyingdong wrote on 2015-10-31:
Quoted 9 lines
Hi All
We encountered a blue screen problem when live migrate Win8.1/Win2012R2 64bit VM from V3 processor to non-V3 processor sandbox, KVM does not has this problem.
After looking into the MSR capabilities, we found XEN hypervisor exposed bit 39 and bit 18 to the VM, from Intel manual bit 39 refers to reserve bit and should not be set, bit 18 refers to MWAIT/MONITOR
Reserved doesn't mean it must be zero or one. Can you help to check it on host?
Quoted 1 line
capability, from my understanding it should not exposed to the VM too.
Yes, the MWAIT/MONITOR should be hidden from guest.
Quoted 11 lines
BTW, KVM does not expose bit 18/39 to the VM.
Below is the boot message: (XEN) read msr: ecx=c0000083, msr_value=0xfffff80028ddf240 (XEN) read msr: ecx=1a0, msr_value=0x4000801889 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (XEN) write msr:msr=40000071, msr_value=0x10000000000082f (XEN) write msr:msr=40000070, msr_value=0x0 (XEN) write msr:msr=40000071, msr_value=0x20000000000082f (XEN) write msr:msr=40000070, msr_value=0x0 (XEN) read msr: ecx=17, msr_value=0x0 (XEN) write msr:msr=8b, msr_value=0x0 (XEN) read msr: ecx=8b, msr_value=0x2d00000000
Best regards,
Yang
Quoted 14 lines · Liuyingdong
Hi All
We encountered a blue screen problem when live migrate Win8.1/Win2012R2 64bit VM from V3 processor to non-V3 processor sandbox, KVM does not has this problem.
After looking into the MSR capabilities, we found XEN hypervisor exposed bit 39 and bit 18 to the VM, from Intel manual bit 39 refers to reserve bit and should not be set, bit 18 refers to MWAIT/MONITOR capability, from my understanding it should not exposed to the VM too.
BTW, KVM does not expose bit 18/39 to the VM.
Quoted 12 lines
Below is the boot message:
(XEN) read msr: ecx=c0000083, msr_value=0xfffff80028ddf240 (XEN) read msr: ecx=1a0, msr_value=0x4000801889
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(XEN) write msr:msr=40000071, msr_value=0x10000000000082f (XEN) write msr:msr=40000070, msr_value=0x0
(XEN) write msr:msr=40000071, msr_value=0x20000000000082f (XEN) write msr:msr=40000070, msr_value=0x0
(XEN) read msr: ecx=17, msr_value=0x0
(XEN) write msr:msr=8b, msr_value=0x0
(XEN) read msr: ecx=8b, msr_value=0x2d00000000
Xen currently does not make any attempt to level MSRs (it is unfortunate that this area has been overlooked).
I have also encountered windows BSODs for this - 0x109 Critical Structure Corruption I am guessing?
I am currently working on fixes to CPUID levelling (as it is more important than MSRs at the moment), but have plans to fix MSR levelling after that.
~Andrew