Re: [PATCH v12 12/22] x86/virt/tdx: Allocate and set up PAMTs for TDMRs

From: Huang, Kai
Date: Tue Jul 11 2023 - 07:49:50 EST


On Tue, 2023-07-11 at 13:42 +0200, David Hildenbrand wrote:
> > - ret = add_tdx_memblock(tmb_list, start_pfn, end_pfn);
> > + ret = add_tdx_memblock(tmb_list, start_pfn, end_pfn, nid);
> >     if (ret)
> >     goto err;
>
> Why did you decide to defer remembering the nid as well? I'd just move
> that part to the patch that adds add_tdx_memblock().

Thanks for the review.

The @nid is used to try to allocate the PAMT from local node. It only gets used
in this patch. Originally (in v7) I had it in patch 09 but Dave suggested to
move to this patch (see the first comment in below link):

https://lore.kernel.org/lkml/8e6803f5-bec6-843d-f3c4-75006ffd0d2f@xxxxxxxxx/