]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Fix TSC MSR read in nested SVM
authorNadav Har'El <nyh@il.ibm.com>
Tue, 2 Aug 2011 12:55:23 +0000 (15:55 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Sep 2011 16:18:03 +0000 (19:18 +0300)
commit3d8f48d0a1a7ffbbb8c59e872e0e6b3a26d29a6c
tree70fe7e743faae2cb65c59dd5a7317be5bc2d7f4d
parentc782cf15a4440425edf834baa0966e96c822652a
KVM: SVM: Fix TSC MSR read in nested SVM

When the TSC MSR is read by an L2 guest (when L1 allowed this MSR to be
read without exit), we need to return L2's notion of the TSC, not L1's.

The current code incorrectly returned L1 TSC, because svm_get_msr() was also
used in x86.c where this was assumed, but now that these places call the new
svm_read_l1_tsc(), the MSR read can be fixed.

Signed-off-by: Nadav Har'El <nyh@il.ibm.com>
Tested-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/svm.c