Re: [PATCH v3 1/5] x86/tdx: Move TDX architectural error codes into <asm/shared/tdx_errno.h>

From: Verma, Vishal L

Date: Thu Apr 02 2026 - 14:18:48 EST


On Thu, 2026-04-02 at 10:47 -0700, Sean Christopherson wrote:
> On Thu, Apr 02, 2026, Vishal Verma 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_errno.h
> >
> > They have some overlap that is already defined similarly. Reduce the
> > duplication by unifying the architectural error codes at:
> >
> >   asm/shared/tdx_errno.h
> >
> > ...and update the headers that contained the duplicated definitions to
> > include the new unified header.
> >
> > "asm/shared" is used for sharing TDX code between the early compressed
> > code and the normal kernel code. While the compressed code for the guest
> > doesn't use these error code header definitions today, it does make the
> > types of calls that return the values they define. So place the defines in
> > "shared" location so that it can, but leave such cleanups for future
> > changes.
> >
> > [Rick: enhance log]
> > [Vishal: reduce to a simple move of architectural defines only]
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> > Signed-off-by: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>
> > Signed-off-by: Vishal Verma <vishal.l.verma@xxxxxxxxx>
>
> Nit, when calling out minor amendments, IMO the blurb in the square braces should
> be after the previous SoB so that there's a clear, consistent chain of handling
> and ordering.  I.e.
>
>   Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
>   [Rick: enhance log]
>   Signed-off-by: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>
>   [Vishal: reduce to a simple move of architectural defines only]
>   Signed-off-by: Vishal Verma <vishal.l.verma@xxxxxxxxx>
>
> That makes it clear the Kirill signed off on something, then Rick tweaked the
> changelog and signed off on _that_, and Vishal came along and simplified the
> path.
>
That is indeed what I'm used to seeing/doing as well, I changed it to
this style after re-reading the tag ordering guidelines in maintainer-
tip.rst:

https://docs.kernel.org/process/maintainer-tip.html#ordering-of-commit-tags

If the handler made modifications to the patch or the changelog,
then this should be mentioned after the changelog text and above all
commit tags in the following format:

... changelog text ends.

[ handler: Replaced foo by bar and updated changelog ]

First-tag: .....

Although now I see I screwed even that up slightly - it calls for a blank
line after the [ ... ] notes.