Re: [PATCH 2/6] x86/virt/tdx: Configure add-on features on TDX module init and update

From: Edgecombe, Rick P

Date: Fri Aug 21 2026 - 17:19:20 EST


On Fri, 2026-08-21 at 07:38 -0700, Dave Hansen wrote:
> On 8/20/26 20:29, Xu Yilun wrote:
> >   static __init int tdx_sys_config(struct tdmr_info_pa_array *tdmr_pa_array,
> > - u64 nr_tdmr_pa, u64 global_keyid)
> > + u64 nr_tdmr_pa, u64 global_keyid,
> > + u64 addon_features0)
>
> addon_features0 is just a copy of the global, static, not changing
> get_tdx_addon_features0() return code, right?
>
> Why pass it around as a function argument?

+1. In the past there was confusion about accessing global metadata while still
reading the metadata, and it wasn't clear whether the global reference was
updated yet. But here it doesn't seem confusing as long as we assume that config
happens before metadata reading.

And for the similar update case outside the above quote, we would call a change
to that field an incompatible update I'd think.