summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2010-10-14 13:49:56 -0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-28 21:51:37 -0700
commit912ecf4173cb78c209090e43a0e6cd0ca295f1f8 (patch)
treebfb958da9b337540d5dec686bfb0044e82998a06
parent668f36c4044b6541ea4ce92515e89f290a1c979d (diff)
KVM: x86: Fix SVM VMCB reset
commit 58877679fd393d3ef71aa383031ac7817561463d upstream. On reset, VMCB TSC should be set to zero. Instead, code was setting tsc_offset to zero, which passes through the underlying TSC. Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--arch/x86/kvm/svm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index ce438e0fdd26..5fb0ebd213bf 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -766,7 +766,7 @@ static void init_vmcb(struct vcpu_svm *svm)
control->iopm_base_pa = iopm_base;
control->msrpm_base_pa = __pa(svm->msrpm);
- control->tsc_offset = 0;
+ control->tsc_offset = 0-native_read_tsc();
control->int_ctl = V_INTR_MASKING_MASK;
init_seg(&save->es);