mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
KVM: Drop kvm_arch_check_processor_compat() hook
Drop kvm_arch_check_processor_compat() and its support code now that all architecture implementations are nops. Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Eric Farman <farman@linux.ibm.com> # s390 Acked-by: Anup Patel <anup@brainfault.org> Reviewed-by: Kai Huang <kai.huang@intel.com> Message-Id: <20221130230934.1014142-33-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
3045c483ee
commit
81a1cf9f89
@@ -5902,36 +5902,14 @@ void kvm_unregister_perf_callbacks(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
struct kvm_cpu_compat_check {
|
||||
void *opaque;
|
||||
int *ret;
|
||||
};
|
||||
|
||||
static void check_processor_compat(void *data)
|
||||
int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module)
|
||||
{
|
||||
struct kvm_cpu_compat_check *c = data;
|
||||
|
||||
*c->ret = kvm_arch_check_processor_compat(c->opaque);
|
||||
}
|
||||
|
||||
int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
|
||||
struct module *module)
|
||||
{
|
||||
struct kvm_cpu_compat_check c;
|
||||
int r;
|
||||
int cpu;
|
||||
|
||||
if (!zalloc_cpumask_var(&cpus_hardware_enabled, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
c.ret = &r;
|
||||
c.opaque = opaque;
|
||||
for_each_online_cpu(cpu) {
|
||||
smp_call_function_single(cpu, check_processor_compat, &c, 1);
|
||||
if (r < 0)
|
||||
goto out_free_2;
|
||||
}
|
||||
|
||||
r = cpuhp_setup_state_nocalls(CPUHP_AP_KVM_STARTING, "kvm/cpu:starting",
|
||||
kvm_starting_cpu, kvm_dying_cpu);
|
||||
if (r)
|
||||
|
Reference in New Issue
Block a user