Re: [PATCH v3 01/16] x86/tdx: Move all TDX error defines into <asm/shared/tdx_errno.h>
From: Huang, Kai
Date: Thu Sep 18 2025 - 21:29:44 EST
On Thu, 2025-09-18 at 16:22 -0700, Rick Edgecombe wrote:
> From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
>
> Today there are two separate locations where TDX error codes are defined:
> arch/x86/include/asm/tdx.h
> arch/x86/kvm/vmx/tdx.h
>
> They have some overlap that is already defined similarly. Reduce the
> duplication and prepare to introduce some helpers for these error codes in
> the central place by unifying them. Join them at:
> asm/shared/tdx_errno.h
> ...and update the headers that contained the duplicated definitions to
> include the new unified header.
The existing asm/shared/tdx.h is used for sharing TDX code between the
early compressed code and the normal kernel code after that, i.e., it's
not for sharing between TDX guest and host.
Any reason to put the new tdx_errno.h under asm/shared/ ?