Re: [PATCH v6 02/11] x86/virt/tdx: Allocate page bitmap for Dynamic PAMT

From: Edgecombe, Rick P

Date: Wed Jul 08 2026 - 16:55:59 EST


On Tue, 2026-07-07 at 20:35 -0700, Sohil Mehta wrote:
> > It why-ifys the comment more, but only gently moves from the auto-generated
> > patterns.
>
> Sure, that's fine if you want to continue the style in this file.
>
> BTW, do you also want to clarify why we fail the init if
> get_tdx_sys_info_tdmr_dpamt() fails?
>
> Is it because:
>
> If reading the DPAMT metadata fails, something is really wrong with the
> TDX module. It is better to fail the initialization in that case.

The reason why it doesn't try to handle it by falling back to normal PAMT is
just to reduce complexity. It's not to protect the kernel or anything.
Supporting broken TDX modules is just not worth the extra possible states we'd
have to consider.

I tweaked it like this, seem reasonable?

/*
* The kernel supports using TDX without Dynamic PAMT, so
* avoid reporting failure if it's not supported. Don't try
* to support buggy TDX modules that advertise dynamic PAMT
* but don't expose the metadata.
*/