]> git.hungrycats.org Git - linux/commit
KVM: TDX: Stuff exit_reason with UNDEFINED on wait_for_sept_zap return
authorXiaoyao Li <xiaoyao.li@intel.com>
Wed, 19 Aug 2026 09:48:59 +0000 (17:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Nov 2026 17:10:49 +0000 (12:10 -0500)
commit55bbc1ab487336f8be644757d9325d2c3654ab05
treea934815fab1d9d77ac8e408729e10716e72b677b
parent07c720cd164fcdc9d3801ccf08ee84cff30bad51
KVM: TDX: Stuff exit_reason with UNDEFINED on wait_for_sept_zap return

commit e5f1d62c59aea4f270773de1bf6e8867f5b1124c upstream.

Forcefully update the exit_reason to KVM's "standard" EXIT_REASON_UNDEFINED
if tdx_vcpu_run() bails without trying to run the vCPU because KVM needs to
wait for an in-progress S-EPT zap to complete.  This avoids handling the
previous exit multiple times due to a stale exit_reason.

Fixes: 4b2abc49712b ("KVM: TDX: Kick off vCPUs when SEAMCALL is busy during TD page removal")
Cc: stable@vger.kernel.org
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://patch.msgid.link/20260819094903.3060020-6-xiaoyao.li@intel.com
[sean: use EXIT_REASON_UNDEFINED, drop comment about bits 31:16]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx/tdx.c