|
|
@@ -5365,7 +5365,8 @@ static void kvm_timer_init(void)
|
|
|
int cpu;
|
|
|
|
|
|
max_tsc_khz = tsc_khz;
|
|
|
- register_hotcpu_notifier(&kvmclock_cpu_notifier_block);
|
|
|
+
|
|
|
+ cpu_notifier_register_begin();
|
|
|
if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) {
|
|
|
#ifdef CONFIG_CPU_FREQ
|
|
|
struct cpufreq_policy policy;
|
|
|
@@ -5382,6 +5383,10 @@ static void kvm_timer_init(void)
|
|
|
pr_debug("kvm: max_tsc_khz = %ld\n", max_tsc_khz);
|
|
|
for_each_online_cpu(cpu)
|
|
|
smp_call_function_single(cpu, tsc_khz_changed, NULL, 1);
|
|
|
+
|
|
|
+ __register_hotcpu_notifier(&kvmclock_cpu_notifier_block);
|
|
|
+ cpu_notifier_register_done();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
static DEFINE_PER_CPU(struct kvm_vcpu *, current_vcpu);
|