]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: TDX: Add macro to retry SEAMCALLs when forcing vCPUs out of guest
authorSean Christopherson <seanjc@google.com>
Thu, 30 Oct 2025 20:09:44 +0000 (13:09 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 5 Nov 2025 19:17:07 +0000 (11:17 -0800)
commit3d626ce5a8cca64eb6d317eef4b24b70a0e5b27b
tree108d2f48850f4e5df8a34ef64c746066c7999aac
parent2ff14116982c663066f3cdb4e2af5dfa7a812caa
KVM: TDX: Add macro to retry SEAMCALLs when forcing vCPUs out of guest

Add a macro to handle kicking vCPUs out of the guest and retrying
SEAMCALLs on TDX_OPERAND_BUSY instead of providing small helpers to be
used by each SEAMCALL.  Wrapping the SEAMCALLs in a macro makes it a
little harder to tease out which SEAMCALL is being made, but
significantly reduces the amount of copy+paste code, and makes it all but
impossible to leave an elevated wait_for_sept_zap.

Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Reviewed-by: Yan Zhao <yan.y.zhao@intel.com>
Tested-by: Yan Zhao <yan.y.zhao@intel.com>
Tested-by: Kai Huang <kai.huang@intel.com>
Link: https://patch.msgid.link/20251030200951.3402865-22-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/tdx.c