Export arch_smp_send_reschedule() so that KVM can use smp_send_reschedule() in common "kick vCPU" code without running afoul of build issues on s390. KVM currently uses smp_call_function_many() when kicking multiple vCPUs, but several KVM architectures (at least arm64 and x86) kick vCPUs with IRQs disabled. Using SMP function calls with IRQs disabled is unsafe as it can lead to two CPUs waiting for each other to respond to the function call, i.e. KVM needs to use smp_send_reschedule() to avoid potential deadlock on other architectures. Alternatively, KVM could go out of its way to avoid smp_send_reschedule() on s390, as KVM does when kicking a single vCPU, but given that all modules can reach smp_send_reschedule() via kick_process(), forcing KVM to dance around s390 adds no practical value and would add non-trivial complexity to KVM. Note, thanks to s390 now building kvm.ko and kvm-arm64.ko, using EXPORT_SYMBOL_FOR_KVM doesn't Just Work. Exporting the symbol just for KVM would also complicate backporting the upcoming fixes to older kernels. For now, keep it simple. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson --- arch/s390/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 32499cad86f0..39318aa7ab7f 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -531,6 +531,7 @@ void arch_smp_send_reschedule(int cpu) { pcpu_ec_call(per_cpu_ptr(&pcpu_devices, cpu), ec_schedule); } +EXPORT_SYMBOL_GPL(arch_smp_send_reschedule); #ifdef CONFIG_IRQ_WORK void arch_irq_work_raise(void) -- 2.56.1.708.g77570a6a1d-goog