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

"Edgecombe, Rick P" <[email protected]>
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.