summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx/vmx.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2024-05-18 02:04:26 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-05-23 18:28:04 +0200
commit743f1773366461cb44de297b1caf0a4292eb8fda (patch)
tree6f1de8044e4b58ed761abc6117af9db3e1179eb1 /arch/x86/kvm/vmx/vmx.c
parentKVM: x86/mmu: Add sanity checks that KVM doesn't create EPT #VE SPTEs (diff)
downloadlinux-743f1773366461cb44de297b1caf0a4292eb8fda.tar.xz
linux-743f1773366461cb44de297b1caf0a4292eb8fda.zip
KVM: VMX: Dump VMCS on unexpected #VE
Dump the VMCS on an unexpected #VE, otherwise it's practically impossible to figure out why the #VE occurred. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-ID: <20240518000430.1118488-6-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to '')
-rw-r--r--arch/x86/kvm/vmx/vmx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 069fbbc1e04a..a02b2720023a 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -5217,8 +5217,10 @@ static int handle_exception_nmi(struct kvm_vcpu *vcpu)
if (is_invalid_opcode(intr_info))
return handle_ud(vcpu);
- if (WARN_ON_ONCE(is_ve_fault(intr_info)))
+ if (WARN_ON_ONCE(is_ve_fault(intr_info))) {
+ dump_vmcs(vcpu);
return 1;
+ }
error_code = 0;
if (intr_info & INTR_INFO_DELIVER_CODE_MASK)