]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Fix nested VMX TSC emulation
authorNadav Har'El <nyh@il.ibm.com>
Tue, 2 Aug 2011 12:54:52 +0000 (15:54 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Sep 2011 16:18:02 +0000 (19:18 +0300)
commitc782cf15a4440425edf834baa0966e96c822652a
treed2e6f68925ccf067acdb69b6f218006344c1bf0a
parentfab56d259ed24a52a88c08d2020b9e2878dc6b44
KVM: nVMX: Fix nested VMX TSC emulation

This patch fixes two corner cases in nested (L2) handling of TSC-related
issues:

1. Somewhat suprisingly, according to the Intel spec, if L1 allows WRMSR to
the TSC MSR without an exit, then this should set L1's TSC value itself - not
offset by vmcs12.TSC_OFFSET (like was wrongly done in the previous code).

2. Allow L1 to disable the TSC_OFFSETING control, and then correctly ignore
the vmcs12.TSC_OFFSET.

Signed-off-by: Nadav Har'El <nyh@il.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c