public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] KVM: VMX: Handle SEAMCALL or TDCALL VM-Exits
@ 2025-10-16 18:21 Sean Christopherson
  2025-10-16 18:21 ` [PATCH v2 1/2] KVM: VMX: Inject #UD if guest tries to execute SEAMCALL or TDCALL Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Sean Christopherson @ 2025-10-16 18:21 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Kai Huang, Xiaoyao Li, Rick Edgecombe,
	Dan Williams, Binbin Wu

Add VM-Exit handlers for SEAMCALL and TDCALL as the instructions are gated
only by VMXON, and so a buggy/misbehaving guest will likely be terminated
(because KVM bails with KVM_INTERNAL_ERROR_UNEXPECTED_EXIT_REASON) if the
guest executes SEAMCALL or TDCALL.

v2:
 - Apply the behavior only to VMX.  KVM can't inject #UDs for TDX, and the
   TDX-Module is supposed to handle SEAMCALL. [Chao]
 - Fix nested exit handling (inverted return). [Xiaoyao]
 - WARN if the TDX-Module punts a SEAMCALL exit to KVM. [Xiaoyao]
 - Fix typos. [Binbin]

v1: https://lore.kernel.org/all/20251014231042.1399849-1-seanjc@google.com

Sean Christopherson (2):
  KVM: VMX: Inject #UD if guest tries to execute SEAMCALL or TDCALL
  KVM: TDX: WARN if a SEAMCALL VM-Exit makes its way out to KVM

 arch/x86/include/uapi/asm/vmx.h | 1 +
 arch/x86/kvm/vmx/nested.c       | 8 ++++++++
 arch/x86/kvm/vmx/tdx.c          | 3 +++
 arch/x86/kvm/vmx/vmx.c          | 8 ++++++++
 4 files changed, 20 insertions(+)


base-commit: 6b36119b94d0b2bb8cea9d512017efafd461d6ac
-- 
2.51.0.858.gf9c4a03a3a-goog


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-11-04 17:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 18:21 [PATCH v2 0/2] KVM: VMX: Handle SEAMCALL or TDCALL VM-Exits Sean Christopherson
2025-10-16 18:21 ` [PATCH v2 1/2] KVM: VMX: Inject #UD if guest tries to execute SEAMCALL or TDCALL Sean Christopherson
2025-10-17  2:53   ` Xiaoyao Li
2025-10-17  5:27   ` Binbin Wu
2025-10-17 10:53   ` Huang, Kai
2025-10-17 13:00     ` Sean Christopherson
2025-10-17 20:34       ` Huang, Kai
2025-10-17 20:34   ` Huang, Kai
2025-10-16 18:21 ` [PATCH v2 2/2] KVM: TDX: WARN if a SEAMCALL VM-Exit makes its way out to KVM Sean Christopherson
2025-10-17  2:56   ` Xiaoyao Li
2025-10-17  5:29   ` Binbin Wu
2025-10-17 10:40   ` Huang, Kai
2025-10-17 17:25     ` Sean Christopherson
2025-10-17 20:58       ` Huang, Kai
2025-10-17 21:11         ` Huang, Kai
2025-10-20  6:10         ` Xiaoyao Li
2025-10-20 15:03           ` Sean Christopherson
2025-11-04 17:45 ` [PATCH v2 0/2] KVM: VMX: Handle SEAMCALL or TDCALL VM-Exits Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox