Re: [PATCH v4 04/16] x86/virt/tdx: Allocate page bitmap for Dynamic PAMT
From: Xu Yilun
Date: Mon Jan 05 2026 - 23:19:20 EST
On Mon, Jan 05, 2026 at 10:06:31PM +0000, Edgecombe, Rick P wrote:
> On Wed, 2025-12-24 at 17:10 +0800, Xu Yilun wrote:
> > Is it better we seal the awkward pattern inside the if (dpamt supported) block:
> >
> > if (tdx_support_dynamic_pamt(&tdx_sysinfo))
> > if (!ret && !(ret = read_sys_metadata_field(0x9100000100000013, &val)))
> > sysinfo_tdmr->pamt_page_bitmap_entry_bits = val;
>
> The extra indentation might be objectionable.
Yes the extra indentation is unconventional, but everything here is, and
we know we will eventually change them all. So I more prefer simple
changes based on:
if (!ret && !(ret = read_sys_metadata_field(0xABCDEF, &val)))
rather than neat but more LOC (when both are easy to read).
Anyway, this is trivial concern. I have more optional fields to add and
will follow the final decision.