Re: [PATCH v2 08/31] x86/virt/tdx: Configure TDX Module with optional TDX Connect feature
From: Huang, Kai
Date: Wed Apr 08 2026 - 04:36:13 EST
> > > + /* configuration to tdx module may change tdx_sysinfo, update it */
> > > + ret = get_tdx_sys_info(&tdx_sysinfo);
> > > + if (ret)
> > > + goto err_reset_pamts;
> > > +
> >
> > How about put this into config_tdx_module()?
> >
> > In this way you can only update global metadata when there's new feature
>
> mm.. personally I don't like such subtle control, especially when
>
> - We expect one or more features are doomed to be enabled.
The new kernel may also run on old hardware where no ext features can be
supported.
> - We are pursuing simple TDX enabling process.
> - This is still not the exact control. If we really want to be precise,
> should check feature by feature, that's not worth it.
>
For the record I am not wanting "exact control". It's totally fine to me to
get global metadata again if there's any ext feature enabled.
And my main comment actually is that init_tdx_module() is already having
many steps, so when the new code could logically fit somewhere else we
should stop making init_tdx_module() more complicated.
But no strong opinion, will leave to you.