KVM guest: Fix kvm clock initialization when it's configured out
authorAvi Kivity <avi@redhat.com>
Thu, 16 Dec 2010 09:27:23 +0000 (11:27 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 12 Jan 2011 09:30:56 +0000 (11:30 +0200)
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kernel/kvm.c

index 91b3d650898c70beef6f9d3ff365b924254ce501..8dc44662394bebadcbbcbb70e6e938adbb2e8ced 100644 (file)
@@ -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();
 }