Re: [PATCH v2 0/2] KVM: VMX: Handle SEAMCALL or TDCALL VM-Exits

Sean Christopherson
2025-11-04T17:46:59Z

On Thu, 16 Oct 2025 11:21:46 -0700, Sean Christopherson wrote:
> 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]
>
> [...]

Applied patch 1 to kvm-x86 fixes.

[1/2] KVM: VMX: Inject #UD if guest tries to execute SEAMCALL or TDCALL
https://github.com/kvm-x86/linux/commit/9d7dfb95da2c

--