x86/reboot: Hoist "disable virt" helpers above "emergency reboot" path
authorSean Christopherson <seanjc@google.com>
Fri, 21 Jul 2023 20:18:46 +0000 (13:18 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 3 Aug 2023 22:37:14 +0000 (15:37 -0700)
commitedc8deb087d884bac2f7013f0c23af73042b23a7
treec782b14f17f70379abb7b691671e03b6c6292556
parentad93c1a7c0102c93e92bf0c06412a1f588e015ab
x86/reboot: Hoist "disable virt" helpers above "emergency reboot" path

Move the various "disable virtualization" helpers above the emergency
reboot path so that emergency_reboot_disable_virtualization() can be
stubbed out in a future patch if neither KVM_INTEL nor KVM_AMD is enabled,
i.e. if there is no in-tree user of CPU virtualization.

No functional change intended.

Reviewed-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/r/20230721201859.2307736-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kernel/reboot.c