Re: [PATCH v10 10/11] Documentation/x86: Add documentation for TDX's Dynamic PAMT
From: Edgecombe, Rick P
Date: Thu Sep 03 2026 - 16:47:48 EST
On Thu, 2026-09-03 at 12:36 -0700, Dave Hansen wrote:
> On 9/3/26 12:31, Edgecombe, Rick P wrote:
> > So we have:
> > 1. If you are inclined to think support bits should actually report whether
> > something is supported, then this kinda is a TDX module bug that we are working
> > around by making DPAMT an opt-in.
> > 2. The bug will only be hit if anyone has configured a low number of hkids.
> >
> > We could optimistically think the TDX module with the fix will be distributed
> > before anyone with this configuration hits it? And if that is wrong, add the
> > keyid checking or opt-in as a fix. Then maybe we save some code long term.
>
> How about we just make the kernel tolerate DPAMT enabling failures. If a
> user makes this weird hkid config, then they'll get temporarily higher
> memory consumption until they fix their config or get a new TDX module.
>
> That seems way better than trying to work around this with opt-ins or
> permanent documentation for a temporary problem.
Tolerating failure would be a bit ugly. It is not a dedicated operation to
enable Dynamic PAMT. It happens along with a bunch of other stuff in
TDH_SYS_CONFIG. So you would need to try once, then make an guess that maybe it
failed because of Dynamic PAMT, and try again without Dynamic PAMT.
This ugly hack might be a bit better to get the same behavior? Basically do the
check TDX module wanted VMMs to do, but in a more convenient way for
the kernel:https://lore.kernel.org/lkml/20260526023515.288829-11-rick.p.edgecombe@xxxxxxxxx/
Maybe add a:
/*
* Work around bug in TDX module where Dynamic PAMT support is reported
* incorrectly. Remove someday when the modules are fixed.
*/