diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f771058cfb5c..dfa97139282d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1455,7 +1455,7 @@ static cycle_t read_tsc(void) | |||
1455 | * but no one has ever seen it happen. | 1455 | * but no one has ever seen it happen. |
1456 | */ | 1456 | */ |
1457 | rdtsc_barrier(); | 1457 | rdtsc_barrier(); |
1458 | ret = (cycle_t)native_read_tsc(); | 1458 | ret = (cycle_t)rdtsc(); |
1459 | 1459 | ||
1460 | last = pvclock_gtod_data.clock.cycle_last; | 1460 | last = pvclock_gtod_data.clock.cycle_last; |
1461 | 1461 | ||
@@ -1646,7 +1646,7 @@ static int kvm_guest_time_update(struct kvm_vcpu *v) | |||
1646 | return 1; | 1646 | return 1; |
1647 | } | 1647 | } |
1648 | if (!use_master_clock) { | 1648 | if (!use_master_clock) { |
1649 | host_tsc = native_read_tsc(); | 1649 | host_tsc = rdtsc(); |
1650 | kernel_ns = get_kernel_ns(); | 1650 | kernel_ns = get_kernel_ns(); |
1651 | } | 1651 | } |
1652 | 1652 | ||
@@ -2810,7 +2810,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
2810 | 2810 | ||
2811 | if (unlikely(vcpu->cpu != cpu) || check_tsc_unstable()) { | 2811 | if (unlikely(vcpu->cpu != cpu) || check_tsc_unstable()) { |
2812 | s64 tsc_delta = !vcpu->arch.last_host_tsc ? 0 : | 2812 | s64 tsc_delta = !vcpu->arch.last_host_tsc ? 0 : |
2813 | native_read_tsc() - vcpu->arch.last_host_tsc; | 2813 | rdtsc() - vcpu->arch.last_host_tsc; |
2814 | if (tsc_delta < 0) | 2814 | if (tsc_delta < 0) |
2815 | mark_tsc_unstable("KVM discovered backwards TSC"); | 2815 | mark_tsc_unstable("KVM discovered backwards TSC"); |
2816 | if (check_tsc_unstable()) { | 2816 | if (check_tsc_unstable()) { |
@@ -2838,7 +2838,7 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) | |||
2838 | { | 2838 | { |
2839 | kvm_x86_ops->vcpu_put(vcpu); | 2839 | kvm_x86_ops->vcpu_put(vcpu); |
2840 | kvm_put_guest_fpu(vcpu); | 2840 | kvm_put_guest_fpu(vcpu); |
2841 | vcpu->arch.last_host_tsc = native_read_tsc(); | 2841 | vcpu->arch.last_host_tsc = rdtsc(); |
2842 | } | 2842 | } |
2843 | 2843 | ||
2844 | static int kvm_vcpu_ioctl_get_lapic(struct kvm_vcpu *vcpu, | 2844 | static int kvm_vcpu_ioctl_get_lapic(struct kvm_vcpu *vcpu, |
@@ -6623,7 +6623,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) | |||
6623 | hw_breakpoint_restore(); | 6623 | hw_breakpoint_restore(); |
6624 | 6624 | ||
6625 | vcpu->arch.last_guest_tsc = kvm_x86_ops->read_l1_tsc(vcpu, | 6625 | vcpu->arch.last_guest_tsc = kvm_x86_ops->read_l1_tsc(vcpu, |
6626 | native_read_tsc()); | 6626 | rdtsc()); |
6627 | 6627 | ||
6628 | vcpu->mode = OUTSIDE_GUEST_MODE; | 6628 | vcpu->mode = OUTSIDE_GUEST_MODE; |
6629 | smp_wmb(); | 6629 | smp_wmb(); |
@@ -7437,7 +7437,7 @@ int kvm_arch_hardware_enable(void) | |||
7437 | if (ret != 0) | 7437 | if (ret != 0) |
7438 | return ret; | 7438 | return ret; |
7439 | 7439 | ||
7440 | local_tsc = native_read_tsc(); | 7440 | local_tsc = rdtsc(); |
7441 | stable = !check_tsc_unstable(); | 7441 | stable = !check_tsc_unstable(); |
7442 | list_for_each_entry(kvm, &vm_list, vm_list) { | 7442 | list_for_each_entry(kvm, &vm_list, vm_list) { |
7443 | kvm_for_each_vcpu(i, vcpu, kvm) { | 7443 | kvm_for_each_vcpu(i, vcpu, kvm) { |