summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorZachary Amsden <zamsden@redhat.com>2010-08-19 22:07:18 -1000
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-01-06 18:08:22 -0500
commitd90a1cae6faee4835d8b5b534d86db9ab5864a7a (patch)
tree8e418384434499452cb387960bbc587386f3fe2c /arch
parent01d1063c93a96ddae04498682eeb50cfd1760a21 (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: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'arch')
-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 49dabc138f5c..508e1362032c 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -632,7 +632,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);