aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm/svm.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2023-07-21 13:18:57 -0700
committerSean Christopherson <[email protected]>2023-08-03 15:37:15 -0700
commit6ae44e012f4c35fb67bc61bd0bf1b3c5f504d931 (patch)
tree8e78fe6c63531084fb6b71c8d8cb93822bc5292e /arch/x86/kvm/svm/svm.c
parent76ab8161083bfd0ae4de9b93e68d639da6e1c726 (diff)
KVM: x86: Force kvm_rebooting=true during emergency reboot/crash
Set kvm_rebooting when virtualization is disabled in an emergency so that KVM eats faults on virtualization instructions even if kvm_reboot() isn't reached. Reviewed-by: Kai Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'arch/x86/kvm/svm/svm.c')
-rw-r--r--arch/x86/kvm/svm/svm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 47f9c7156609..8d1b3c801629 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -605,6 +605,8 @@ fault:
static void svm_emergency_disable(void)
{
+ kvm_rebooting = true;
+
kvm_cpu_svm_disable();
}