Re: [PATCH 2/5] x86/virt/tdx: Move TDMR metadata fields map table to local variable

From: Edgecombe, Rick P
Date: Thu May 02 2024 - 20:10:06 EST


On Sat, 2024-03-02 at 00:20 +1300, Kai Huang wrote:
> The kernel reads all TDMR related global metadata fields based on a
> table which maps the metadata fields to the corresponding members of
> 'struct tdx_tdmr_sysinfo'.
>
> Currently this table is a static variable.  But this table is only used
> by the function which reads these metadata fields and becomes useless
> after reading is done.
>
> Change the table to function local variable.  This also saves the
> storage of the table from the kernel image.

It seems like a reasonable change, but I don't see how it helps the purpose of
this series. It seems more like generic cleanup. Can you explain?