KVM: VMX: Introduce test mode related to EPT violation VE
authorIsaku Yamahata <isaku.yamahata@intel.com>
Mon, 22 Jan 2024 23:53:18 +0000 (15:53 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Apr 2024 16:15:21 +0000 (12:15 -0400)
commit8131cf5b4fd8c58f30a01b906a86a77a33b0293a
treedd84673e22ee0e2147e42cd6e6375903ef1a418d
parentfb29541eadb679261cdbd8c4d56444d68ee777fb
KVM: VMX: Introduce test mode related to EPT violation VE

To support TDX, KVM is enhanced to operate with #VE.  For TDX, KVM uses the
suppress #VE bit in EPT entries selectively, in order to be able to trap
non-present conditions.  However, #VE isn't used for VMX and it's a bug
if it happens.  To be defensive and test that VMX case isn't broken
introduce an option ept_violation_ve_test and when it's set, BUG the vm.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Message-Id: <d6db6ba836605c0412e166359ba5c46a63c22f86.1705965635.git.isaku.yamahata@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/Kconfig
arch/x86/kvm/vmx/vmcs.h
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h