Re: [PATCH v6 10/11] x86/virt/tdx: Enable Dynamic PAMT

From: Chao Gao

Date: Fri Jun 05 2026 - 01:27:18 EST


On Thu, Jun 04, 2026 at 06:14:17PM +0100, Kiryl Shutsemau wrote:
>On Mon, May 25, 2026 at 07:35:14PM -0700, Rick Edgecombe wrote:
>> @@ -152,7 +156,12 @@ const struct tdx_sys_info *tdx_get_sysinfo(void);
>>
>> static inline bool tdx_supports_dynamic_pamt(const struct tdx_sys_info *sysinfo)
>> {
>> - return false; /* To be enabled when kernel is ready */
>> + /*
>> + * The TDX Module's internal Dynamic PAMT tree structure can't
>> + * handle physical addresses with more than 48 bits.
>> + */
>> + return sysinfo->features.tdx_features0 & TDX_FEATURES0_DYNAMIC_PAMT &&
>> + boot_cpu_data.x86_phys_bits <= 48;
>
>Should we warn for >48?

Maybe we should drop this check. If the TDX module cannot handle that case,
advertising TDX_FEATURES0_DYNAMIC_PAMT is a bug and should be fixed by the
module.