Re: [PATCH v2 1/5] x86/tdx: Move all TDX error defines into <asm/shared/tdx_errno.h>
From: Edgecombe, Rick P
Date: Tue Mar 31 2026 - 17:51:37 EST
On Tue, 2026-03-31 at 12:30 -0700, Sean Christopherson wrote:
> +#define TDX_SW_ERROR (TDX_ERROR | GENMASK_ULL(47, 40))
> > +#define TDX_SEAMCALL_VMFAILINVALID (TDX_SW_ERROR | _ULL(0xFFFF0000))
> > +
> > +#define TDX_SEAMCALL_GP (TDX_SW_ERROR | X86_TRAP_GP)
> > +#define TDX_SEAMCALL_UD (TDX_SW_ERROR | X86_TRAP_UD)
>
> I don't think the host's SW-defined error codes should be used by the guest. The
> guest can't even make SEAMCALLs. So unless I'm misunderstanding the purpose, I
> don't think it makes sense to move these into tdx_errno.h.
Seems reasonable.
>
> Regardless, please split this up into two patches:
>
> 1. Move tdx_errno.h
> 2. Land more #defines in tdx_errno.h
>
> Because IIUC, tdx_errno.h holds *only* architecturally defined values, which makes
> (1) super duper trivial to review and ack.
Thanks!