diff options
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4fa1ccad7beb..10d69a6df14f 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2236,7 +2236,7 @@ static u64 guest_read_tsc(void) | |||
2236 | { | 2236 | { |
2237 | u64 host_tsc, tsc_offset; | 2237 | u64 host_tsc, tsc_offset; |
2238 | 2238 | ||
2239 | host_tsc = native_read_tsc(); | 2239 | host_tsc = rdtsc(); |
2240 | tsc_offset = vmcs_read64(TSC_OFFSET); | 2240 | tsc_offset = vmcs_read64(TSC_OFFSET); |
2241 | return host_tsc + tsc_offset; | 2241 | return host_tsc + tsc_offset; |
2242 | } | 2242 | } |
@@ -2317,7 +2317,7 @@ static void vmx_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment, bool ho | |||
2317 | 2317 | ||
2318 | static u64 vmx_compute_tsc_offset(struct kvm_vcpu *vcpu, u64 target_tsc) | 2318 | static u64 vmx_compute_tsc_offset(struct kvm_vcpu *vcpu, u64 target_tsc) |
2319 | { | 2319 | { |
2320 | return target_tsc - native_read_tsc(); | 2320 | return target_tsc - rdtsc(); |
2321 | } | 2321 | } |
2322 | 2322 | ||
2323 | static bool guest_cpuid_has_vmx(struct kvm_vcpu *vcpu) | 2323 | static bool guest_cpuid_has_vmx(struct kvm_vcpu *vcpu) |