Re: [PATCH v2 08/31] x86/virt/tdx: Configure TDX Module with optional TDX Connect feature

Huang, Kai
2026-04-08T08:33:19Z

> > > + /* 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.