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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index cdac9e592aa..79d9606c202 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -981,7 +981,7 @@ static inline u64 nsec_to_cycles(u64 nsec)
981 if (kvm_tsc_changes_freq()) 981 if (kvm_tsc_changes_freq())
982 printk_once(KERN_WARNING 982 printk_once(KERN_WARNING
983 "kvm: unreliable cycle conversion on adjustable rate TSC\n"); 983 "kvm: unreliable cycle conversion on adjustable rate TSC\n");
984 ret = nsec * __get_cpu_var(cpu_tsc_khz); 984 ret = nsec * __this_cpu_read(cpu_tsc_khz);
985 do_div(ret, USEC_PER_SEC); 985 do_div(ret, USEC_PER_SEC);
986 return ret; 986 return ret;
987} 987}
@@ -1066,7 +1066,7 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
1066 local_irq_save(flags); 1066 local_irq_save(flags);
1067 kvm_get_msr(v, MSR_IA32_TSC, &tsc_timestamp); 1067 kvm_get_msr(v, MSR_IA32_TSC, &tsc_timestamp);
1068 kernel_ns = get_kernel_ns(); 1068 kernel_ns = get_kernel_ns();
1069 this_tsc_khz = __get_cpu_var(cpu_tsc_khz); 1069 this_tsc_khz = __this_cpu_read(cpu_tsc_khz);
1070 1070
1071 if (unlikely(this_tsc_khz == 0)) { 1071 if (unlikely(this_tsc_khz == 0)) {
1072 local_irq_restore(flags); 1072 local_irq_restore(flags);
@@ -4432,7 +4432,7 @@ EXPORT_SYMBOL_GPL(kvm_fast_pio_out);
4432 4432
4433static void tsc_bad(void *info) 4433static void tsc_bad(void *info)
4434{ 4434{
4435 __get_cpu_var(cpu_tsc_khz) = 0; 4435 __this_cpu_write(cpu_tsc_khz, 0);
4436} 4436}
4437 4437
4438static void tsc_khz_changed(void *data) 4438static void tsc_khz_changed(void *data)
@@ -4446,7 +4446,7 @@ static void tsc_khz_changed(void *data)
4446 khz = cpufreq_quick_get(raw_smp_processor_id()); 4446 khz = cpufreq_quick_get(raw_smp_processor_id());
4447 if (!khz) 4447 if (!khz)
4448 khz = tsc_khz; 4448 khz = tsc_khz;
4449 __get_cpu_var(cpu_tsc_khz) = khz; 4449 __this_cpu_write(cpu_tsc_khz, khz);
4450} 4450}
4451 4451
4452static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val, 4452static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val,