aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1dfe9d318734..1155059c512e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1150,7 +1150,7 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
1150 1150
1151 /* Keep irq disabled to prevent changes to the clock */ 1151 /* Keep irq disabled to prevent changes to the clock */
1152 local_irq_save(flags); 1152 local_irq_save(flags);
1153 tsc_timestamp = kvm_x86_ops->read_l1_tsc(v); 1153 tsc_timestamp = kvm_x86_ops->read_l1_tsc(v, native_read_tsc());
1154 kernel_ns = get_kernel_ns(); 1154 kernel_ns = get_kernel_ns();
1155 this_tsc_khz = __get_cpu_var(cpu_tsc_khz); 1155 this_tsc_khz = __get_cpu_var(cpu_tsc_khz);
1156 if (unlikely(this_tsc_khz == 0)) { 1156 if (unlikely(this_tsc_khz == 0)) {
@@ -5338,7 +5338,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
5338 if (hw_breakpoint_active()) 5338 if (hw_breakpoint_active())
5339 hw_breakpoint_restore(); 5339 hw_breakpoint_restore();
5340 5340
5341 vcpu->arch.last_guest_tsc = kvm_x86_ops->read_l1_tsc(vcpu); 5341 vcpu->arch.last_guest_tsc = kvm_x86_ops->read_l1_tsc(vcpu,
5342 native_read_tsc());
5342 5343
5343 vcpu->mode = OUTSIDE_GUEST_MODE; 5344 vcpu->mode = OUTSIDE_GUEST_MODE;
5344 smp_wmb(); 5345 smp_wmb();