Re: [PATCH v6 01/11] x86/virt/tdx: Simplify tdmr_get_pamt_sz()

From: Edgecombe, Rick P

Date: Mon Jul 06 2026 - 16:18:54 EST


On Fri, 2026-07-03 at 13:48 +0800, Chao Gao wrote:
> On Mon, May 25, 2026 at 07:35:05PM -0700, Rick Edgecombe wrote:
> > Since the loop that iterates over it is gone, further simplify the code by
> > dropping the array of intermediate size and base storage. Just store the
> > values to their final locations.
>
> > Accept the small complication of having
> > to clear tdmr->pamt_4k_base in the error path, so that tdmr_do_pamt_func()
> > will not try to operate on the TDMR struct when attempting to free it.
>
> The clearing of tdmr->pamt_4k_base was dropped, so this section is a bit
> stale. Apart from this nit,

Oh, good point.

>
> Reviewed-by: Chao Gao <chao.gao@xxxxxxxxx>

Thanks, and for the others.