Re: [PATCH v2 2/5] x86/virt/tdx: Configure add-on features on TDX module init

From: Tony Lindgren

Date: Tue Sep 22 2026 - 03:20:33 EST


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
calling code a bit more readable without having to figure out what it
returns.

Other than that:

Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>