Skip to content

Commit

Permalink
KVM: x86: Fix SVM VMCB reset
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
Zachary Amsden authored and avikivity committed Oct 11, 2010
1 parent 85a3318 commit 5887767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5887767

Please sign in to comment.