Re: [PATCH] KVM: VMX: Formally define KVM's "0xdead" exit reason used for failed VM-Enter
From: Sean Christopherson
Date: Wed Sep 23 2026 - 08:48:00 EST
On Wed, Sep 23, 2026, Rick P Edgecombe wrote:
> On Mon, 2026-09-21 at 16:56 -0700, Sean Christopherson wrote:
> > Add EXIT_REASON_UNDEFINED to track KVM's magic "0xdead" value that's used
> > to stuff the exit reason on a failed VM-Enter so that the magic can be
> > reused by TDX, and to make it more obvious that it's an arbitrary, KVM-
> > defined value (though the whole "dead" thing makes it pretty darn obvious).
> >
> > Opportunistically add a compile-time assert to ensure the KVM-defined exit
> > reason never collides with a "real" exit reason.
> >
> > No functional change intended.
> >
> > Cc: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>
> > Cc: Yan Zhao <yan.y.zhao@xxxxxxxxx>
> > Cc: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>
> > Cc: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>
>
> > Cc: stable@xxxxxxxxxxxxxxx
>
> ?? To help the backport of the DOS stuff? Seems strange: "no functional change
> intended, CC stable"
Yep, I massaged two of those patches ("thanks" incoming soon) to yield:
KVM: TDX: Stuff exit_reason with UNDEFINED on wait_for_sept_zap return
KVM: TDX: Set bits 31:16 to 0 and use UNDEFINED when synthesizing exit reason