Browse Source

KVM guest: Fix kvm clock initialization when it's configured out

Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity 14 years ago
parent
commit
a63512a4d7
1 changed files with 2 additions and 0 deletions
  1. 2 0
      arch/x86/kernel/kvm.c

+ 2 - 0
arch/x86/kernel/kvm.c

@@ -486,7 +486,9 @@ static struct notifier_block kvm_pv_reboot_nb = {
 #ifdef CONFIG_SMP
 static void __init kvm_smp_prepare_boot_cpu(void)
 {
+#ifdef CONFIG_KVM_CLOCK
 	WARN_ON(kvm_register_clock("primary cpu clock"));
+#endif
 	kvm_guest_cpu_init();
 	native_smp_prepare_boot_cpu();
 }