aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/svm.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 7f4e225feebf..b373ae6fb974 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -765,14 +765,16 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
765 if (unlikely(cpu != vcpu->cpu)) { 765 if (unlikely(cpu != vcpu->cpu)) {
766 u64 delta; 766 u64 delta;
767 767
768 /* 768 if (check_tsc_unstable()) {
769 * Make sure that the guest sees a monotonically 769 /*
770 * increasing TSC. 770 * Make sure that the guest sees a monotonically
771 */ 771 * increasing TSC.
772 delta = vcpu->arch.host_tsc - native_read_tsc(); 772 */
773 svm->vmcb->control.tsc_offset += delta; 773 delta = vcpu->arch.host_tsc - native_read_tsc();
774 if (is_nested(svm)) 774 svm->vmcb->control.tsc_offset += delta;
775 svm->nested.hsave->control.tsc_offset += delta; 775 if (is_nested(svm))
776 svm->nested.hsave->control.tsc_offset += delta;
777 }
776 vcpu->cpu = cpu; 778 vcpu->cpu = cpu;
777 kvm_migrate_timers(vcpu); 779 kvm_migrate_timers(vcpu);
778 svm->asid_generation = 0; 780 svm->asid_generation = 0;