KVM: x86/mmu: Print SPTEs on unexpected #VE
authorSean Christopherson <seanjc@google.com>
Sat, 18 May 2024 00:04:27 +0000 (17:04 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 May 2024 16:28:45 +0000 (12:28 -0400)
commitbca99c0356524a620126b789edbaf25934415467
treecc3da88b177b8fd7a9e8bdb91ae362560f9fde62
parent743f1773366461cb44de297b1caf0a4292eb8fda
KVM: x86/mmu: Print SPTEs on unexpected #VE

Print the SPTEs that correspond to the faulting GPA on an unexpected EPT
Violation #VE to help the user debug failures, e.g. to pinpoint which SPTE
didn't have SUPPRESS_VE set.

Opportunistically assert that the underlying exit reason was indeed an EPT
Violation, as the CPU has *really* gone off the rails if a #VE occurs due
to a completely unexpected exit reason.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20240518000430.1118488-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/vmx/vmx.c