Re: [PATCH v4 5/9] KVM: TDX: Update exit_reason on wait_for_sept_zap return

From: Edgecombe, Rick P

Date: Wed Aug 19 2026 - 15:08:43 EST


On Wed, 2026-08-19 at 17:48 +0800, Xiaoyao Li wrote:
> Update exit_reason to a value with bit[31:16] cleared and bit[15:0]
> set to TDX_INVALID_EXIT_REASON when it needs to return early due to
> wait_for_sept_zap in tdx_vcpu_run().  This avoids the stale exit_reason
> of the previous Exit being consumed twice.

Would be nice to describe a bit more on the failure mode.

>
> Fixes: 4b2abc49712b ("KVM: TDX: Kick off vCPUs when SEAMCALL is busy during TD
> page removal")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>
> ---
> Changes in v4:
> - new patch;
> ---

Code seems much clearer to me than the single bit clear.