Re: [PATCH v3 3/4] KVM: TDX: Don't assume exit_reason[31:16] as all-0 in tdx_to_vmx_exit_reason()
Sean Christopherson <[email protected]>
| Newsgroups | dev.linux.lists.sashiko-reviews,org.kernel.vger.kvm |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 12, 2026, Xiaoyao Li wrote: > On 8/12/2026 4:23 PM, [email protected] wrote: > > > diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c > > When the basic exit reason is set to TDX_INVALID_EXIT_REASON here, but upper > > bits like Bus Lock are preserved in exit_reason.full, does this break > > tdx_get_exit_info()? > > > > In tdx_get_exit_info(), it evaluates against the full 32-bit exit reason: > > > > *reason = tdx->vt.exit_reason.full; > > if (*reason != TDX_INVALID_EXIT_REASON) { > > *info1 = vmx_get_exit_qual(vcpu); > > ... > > > > Since TDX_INVALID_EXIT_REASON is the 16-bit 0xFFFF, this check will pass if > > any upper bits are set, even if the basic reason was marked invalid, > > incorrectly exposing meaningless hardware state. > > Oh, I should have called it out it's intentional to check the full 32 bits > Exit Reason instead of checking the lower 16 bits .basic field as what it > did in the v2. Please wait for discussion to die down before sending new versions. You sent this version literally the same day you responded to some of my comments on v2. Now the discussion is spread across different mail threads and I'm having to piece the converation together. In short, spamming versions makes it harder to review, and thus slows the process down; it doesn't speed things up.