Re: [PATCH v5 1/6] x86/virt/tdx: Move TDH.SYS.CONFIG operations into a wrapper
From: Nikolay Borisov
Date: Fri Nov 13 2026 - 12:46:44 EST
On 11.11.26 г. 5:48 ч., 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.
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.
Signed-off-by: Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/all/20260904215841.303070-10-rick.p.edgecombe@xxxxxxxxx/ # [1]
Reviewed-by: Nikolay Borisov <nik.borisov@xxxxxxxx>