x86/reboot: KVM: Disable SVM during reboot via virt/KVM reboot callback
authorSean Christopherson <seanjc@google.com>
Fri, 21 Jul 2023 20:18:44 +0000 (13:18 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 3 Aug 2023 22:37:14 +0000 (15:37 -0700)
commitbaeb4de7ad12b700a91f2a7be8e1c0389a5c8fd4
treee94d52ff9c7211d843c24b93f2cb27072edc5efc
parent119b5cb4ffd0166f3e98e9ee042f5046f7744f28
x86/reboot: KVM: Disable SVM during reboot via virt/KVM reboot callback

Use the virt callback to disable SVM (and set GIF=1) during an emergency
instead of blindly attempting to disable SVM.  Like the VMX case, if a
hypervisor, i.e. KVM, isn't loaded/active, SVM can't be in use.

Acked-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/r/20230721201859.2307736-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/virtext.h
arch/x86/kernel/reboot.c
arch/x86/kvm/svm/svm.c