Re: [PATCH v2 2/5] x86/virt/tdx: Configure add-on features on TDX module init
From: Xu Yilun
Date: Wed Sep 23 2026 - 03:38:19 EST
On Tue, Sep 22, 2026 at 10:13:56AM +0300, Tony Lindgren wrote:
> On Tue, Sep 15, 2026 at 06:26:55PM +0800, Xu Yilun wrote:
> > --- a/arch/x86/virt/vmx/tdx/tdx.c
> > +++ b/arch/x86/virt/vmx/tdx/tdx.c
> > @@ -998,6 +998,15 @@ static __init int construct_tdmrs(struct list_head *tmb_list,
> > return ret;
> > }
> >
> > +/* List all kernel supported add-on features0 bits here */
> > +#define TDX_KERNEL_SUPPORTED_ADDON_FEATURES0 (0)
> > +
> > +static __init u64 get_tdx_addon_features0(void)
> > +{
> > + return tdx_sysinfo.features.tdx_features0 &
> > + TDX_KERNEL_SUPPORTED_ADDON_FEATURES0;
> > +}
>
> How about get_tdx_supported_addon_features() for the above? It makes the
mm.. I think this would make a bit confusion. "tdx_supported" reads like
the module supported features, which is just .tdx_features0. But here we
want both the module & kernel support. I'm thinking of:
get_tdx_addon_features0(), just as is
or
tdx_get_supported_addon_features0(), maybe this is better?
> calling code a bit more readable without having to figure out what it
> returns.
>
> Other than that:
>
> Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>