]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: VMX: Don't kill the VM on an unexpected #VE
authorSean Christopherson <seanjc@google.com>
Sat, 18 May 2024 00:04:28 +0000 (17:04 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 May 2024 16:27:17 +0000 (12:27 -0400)
Don't terminate the VM on an unexpected #VE, as it's extremely unlikely
the #VE is fatal to the guest, and even less likely that it presents a
danger to the host.  Simply resume the guest on "failure", as the #VE info
page's BUSY field will prevent converting any more EPT Violations to #VEs
for the vCPU (at least, that's what the BUSY field is supposed to do).

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20240518000430.1118488-8-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c

index 51b2cd13250a2d232dfff04341a345c1be967303..069fbbc1e04a0077b150b0c694693dd3e5e371d3 100644 (file)
@@ -5217,8 +5217,8 @@ static int handle_exception_nmi(struct kvm_vcpu *vcpu)
        if (is_invalid_opcode(intr_info))
                return handle_ud(vcpu);
 
-       if (KVM_BUG_ON(is_ve_fault(intr_info), vcpu->kvm))
-               return -EIO;
+       if (WARN_ON_ONCE(is_ve_fault(intr_info)))
+               return 1;
 
        error_code = 0;
        if (intr_info & INTR_INFO_DELIVER_CODE_MASK)