diff options
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 5dee3024579d..2be6b1ca1a06 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -3102,6 +3102,7 @@ int kvm_init_arch(struct kvm_arch_ops *ops, unsigned int vcpu_size, | |||
3102 | struct module *module) | 3102 | struct module *module) |
3103 | { | 3103 | { |
3104 | int r; | 3104 | int r; |
3105 | int cpu; | ||
3105 | 3106 | ||
3106 | if (kvm_arch_ops) { | 3107 | if (kvm_arch_ops) { |
3107 | printk(KERN_ERR "kvm: already loaded the other module\n"); | 3108 | printk(KERN_ERR "kvm: already loaded the other module\n"); |
@@ -3123,6 +3124,14 @@ int kvm_init_arch(struct kvm_arch_ops *ops, unsigned int vcpu_size, | |||
3123 | if (r < 0) | 3124 | if (r < 0) |
3124 | goto out; | 3125 | goto out; |
3125 | 3126 | ||
3127 | for_each_online_cpu(cpu) { | ||
3128 | smp_call_function_single(cpu, | ||
3129 | kvm_arch_ops->check_processor_compatibility, | ||
3130 | &r, 0, 1); | ||
3131 | if (r < 0) | ||
3132 | goto out_free_0; | ||
3133 | } | ||
3134 | |||
3126 | on_each_cpu(hardware_enable, NULL, 0, 1); | 3135 | on_each_cpu(hardware_enable, NULL, 0, 1); |
3127 | r = register_cpu_notifier(&kvm_cpu_notifier); | 3136 | r = register_cpu_notifier(&kvm_cpu_notifier); |
3128 | if (r) | 3137 | if (r) |
@@ -3169,6 +3178,7 @@ out_free_2: | |||
3169 | unregister_cpu_notifier(&kvm_cpu_notifier); | 3178 | unregister_cpu_notifier(&kvm_cpu_notifier); |
3170 | out_free_1: | 3179 | out_free_1: |
3171 | on_each_cpu(hardware_disable, NULL, 0, 1); | 3180 | on_each_cpu(hardware_disable, NULL, 0, 1); |
3181 | out_free_0: | ||
3172 | kvm_arch_ops->hardware_unsetup(); | 3182 | kvm_arch_ops->hardware_unsetup(); |
3173 | out: | 3183 | out: |
3174 | kvm_arch_ops = NULL; | 3184 | kvm_arch_ops = NULL; |