diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-10-14 11:22:49 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 11:23:10 +0200 |
commit | ca3f10172eea9b95bbb66487656f3c3e93855702 (patch) | |
tree | 286b7c659b6e7c6c1e901f727fb6aad5a328eeb6 /arch/x86/kernel/kvm.c | |
parent | 49c7754ce57063b819b01eb8a4290841ad0886c4 (diff) | |
download | op-kernel-dev-ca3f10172eea9b95bbb66487656f3c3e93855702.zip op-kernel-dev-ca3f10172eea9b95bbb66487656f3c3e93855702.tar.gz |
KVM paravirt: Move kvm_smp_prepare_boot_cpu() from kvmclock.c to kvm.c.
Async PF also needs to hook into smp_prepare_boot_cpu so move the hook
into generic code.
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
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 63b0ec8..e6db179 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -231,10 +231,21 @@ static void __init paravirt_ops_setup(void) #endif } +#ifdef CONFIG_SMP +static void __init kvm_smp_prepare_boot_cpu(void) +{ + WARN_ON(kvm_register_clock("primary cpu clock")); + native_smp_prepare_boot_cpu(); +} +#endif + void __init kvm_guest_init(void) { if (!kvm_para_available()) return; paravirt_ops_setup(); +#ifdef CONFIG_SMP + smp_ops.smp_prepare_boot_cpu = kvm_smp_prepare_boot_cpu; +#endif } |