diff options
Diffstat (limited to 'arch/x86/kernel/kvm.c')
-rw-r--r-- | arch/x86/kernel/kvm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 63b0ec8d3d4a..e6db17976b82 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c | |||
@@ -231,10 +231,21 @@ static void __init paravirt_ops_setup(void) | |||
231 | #endif | 231 | #endif |
232 | } | 232 | } |
233 | 233 | ||
234 | #ifdef CONFIG_SMP | ||
235 | static void __init kvm_smp_prepare_boot_cpu(void) | ||
236 | { | ||
237 | WARN_ON(kvm_register_clock("primary cpu clock")); | ||
238 | native_smp_prepare_boot_cpu(); | ||
239 | } | ||
240 | #endif | ||
241 | |||
234 | void __init kvm_guest_init(void) | 242 | void __init kvm_guest_init(void) |
235 | { | 243 | { |
236 | if (!kvm_para_available()) | 244 | if (!kvm_para_available()) |
237 | return; | 245 | return; |
238 | 246 | ||
239 | paravirt_ops_setup(); | 247 | paravirt_ops_setup(); |
248 | #ifdef CONFIG_SMP | ||
249 | smp_ops.smp_prepare_boot_cpu = kvm_smp_prepare_boot_cpu; | ||
250 | #endif | ||
240 | } | 251 | } |