Skip to content

Commit a63512a

Browse files
committed
KVM guest: Fix kvm clock initialization when it's configured out
Signed-off-by: Avi Kivity <[email protected]>
1 parent 175504c commit a63512a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/kernel/kvm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,9 @@ static struct notifier_block kvm_pv_reboot_nb = {
486486
#ifdef CONFIG_SMP
487487
static void __init kvm_smp_prepare_boot_cpu(void)
488488
{
489+
#ifdef CONFIG_KVM_CLOCK
489490
WARN_ON(kvm_register_clock("primary cpu clock"));
491+
#endif
490492
kvm_guest_cpu_init();
491493
native_smp_prepare_boot_cpu();
492494
}

0 commit comments

Comments
 (0)