]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: TDX: Handle SMI request as !CONFIG_KVM_SMM
authorIsaku Yamahata <isaku.yamahata@intel.com>
Sat, 22 Feb 2025 01:47:49 +0000 (09:47 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Mar 2025 18:20:56 +0000 (14:20 -0400)
commit2b06beb08f560dbc14f1887cc32f7291586209c4
tree21352048890f5404492ef3bc171e574fd43598b6
parentacc64eb4e2931a09e3f33625511b90e8af29503d
KVM: TDX: Handle SMI request as !CONFIG_KVM_SMM

Handle SMI request as what KVM does for CONFIG_KVM_SMM=n, i.e. return
-ENOTTY, and add KVM_BUG_ON() to SMI related OPs for TD.

TDX doesn't support system-management mode (SMM) and system-management
interrupt (SMI) in guest TDs.  Because guest state (vCPU state, memory
state) is protected, it must go through the TDX module APIs to change
guest state.  However, the TDX module doesn't provide a way for VMM to
inject SMI into guest TD or a way for VMM to switch guest vCPU mode into
SMM.

MSR_IA32_SMBASE will not be emulated for TDX guest, -ENOTTY will be
returned when SMI is requested.

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Co-developed-by: Binbin Wu <binbin.wu@linux.intel.com>
Signed-off-by: Binbin Wu <binbin.wu@linux.intel.com>
Message-ID: <20250222014757.897978-9-binbin.wu@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/smm.h
arch/x86/kvm/vmx/main.c