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

From: Chao Gao

Date: Fri Jul 03 2026 - 01:52:32 EST


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,

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