x86/reboot: emergency callbacks are now registered by common KVM code
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Oct 2024 14:34:58 +0000 (10:34 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 6 Oct 2024 07:55:37 +0000 (03:55 -0400)
commit2a5fe5a01668e831af1de3951718fbf88b9a9b9c
tree1216f4bbd5403dec3e0b1bc6d59f5e78b3ff9578
parentea4290d77bda2bd1f173a86f07aa79b568e0a6f8
x86/reboot: emergency callbacks are now registered by common KVM code

Guard them with CONFIG_KVM_X86_COMMON rather than the two vendor modules.
In practice this has no functional change, because CONFIG_KVM_X86_COMMON
is set if and only if at least one vendor-specific module is being built.
However, it is cleaner to specify CONFIG_KVM_X86_COMMON for functions that
are used in kvm.ko.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Fixes: 590b09b1d88e ("KVM: x86: Register "emergency disable" callbacks when virt is enabled")
Fixes: 6d55a94222db ("x86/reboot: Unconditionally define cpu_emergency_virt_cb typedef")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/reboot.h
arch/x86/kernel/reboot.c