Re: [PATCH v5 1/6] x86/virt/tdx: Move TDH.SYS.CONFIG operations into a wrapper

From: Xu Yilun

Date: Wed Nov 18 2026 - 22:41:57 EST


On Wed, Nov 18, 2026 at 06:51:30PM +0000, Edgecombe, Rick P wrote:
> On Wed, 2026-11-11 at 11:48 +0800, Xu Yilun wrote:
> > TDH.SYS.CONFIG is currently not wrapped in a SEAMCALL wrapper because it
> > is not exposed to external callers (such as KVM), also because the
> > level of TDX ABI details needed to perform the call is low enough to
> > flow well with the calling code.
> >
> > But as more configurations are being added to this SEAMCALL leaf, more
> > ABI details are leaked into the surrounding caller code, which decreases
> > the readability of the caller logic. The first case is that the Dynamic
> > PAMT (DPAMT) change [1] tweaks the R8 argument based on whether DPAMT is
> > supported by the loaded TDX module.
> >
> > A follow-up case comes as the TDX architecture has evolved the ABI to
> > introduce new leaf versions. The host must select the version to call
> > based on what new features are supported by the loaded TDX module.
>
> It is not totally clear to me what a leaf version is here. Like is it a new leaf
> or (as it actually is) a new variant of a single leaf.

How about:

A follow-up case comes as the TDX architecture has introduced a new
variant of TDH.SYS.CONFIG by adding a new leaf version for it. The
host must ...

>
> >
> > Before the version selection makes the caller logic even messier, move
> > the register ABI operations into a wrapper.
> >
> > The original changelog was written by hand. AI was used to help correct
> > grammatical errors and polish individual sentences for better
> > readability.
>
> Looks good overall, but weren't we going to drop the AI blurb? Oh oops that was
> a comment on a different series:
> https://lore.kernel.org/lkml/03cdc774-7fef-4d0b-82f7-126288636f3d@xxxxxxxxx/

Yeah I saw this thread. My reading was that this sentence "AI was used
under supervision to review code and workshop logs" is too broad to be
meaningful. I have cut this sentence for this version, but keep details
about how I use AI to refactor logs.

So can we conclude that if the AI usage is expected, then we don't write
it? In that case, yes I should drop it.