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

From: Chao Gao

Date: Tue Sep 15 2026 - 23:23:50 EST


On Tue, Sep 15, 2026 at 06:26:55PM +0800, Xu Yilun wrote:
>The TDX architecture identifies some features that are off by default
>but can be enabled by the host during TDX module initialization. They
>are classified as add-on features because enabling them affects existing
>TDX systems: they may change existing feature behavior, or reserve more
>memory.
>
>The TDX module extends TDH.SYS.CONFIG with a new register argument to
>specify which add-on features to enable. This new argument is a bitmap
>that uses the same feature bits as TDX_FEATURES0. Note that Dynamic PAMT
>is an exception: although it is an add-on feature, it is controlled via
>a legacy, dedicated register argument [1].
>
>The kernel needs to enable these add-on features when it supports them.
>Add a get_tdx_addon_features0() helper to return the bitmap of the add-on
>features that the module & kernel both support. Initially, this helper
>returns 0. It will be updated to return specific feature bits as full
>kernel support lands. Pass this extra bitmap to TDH.SYS.CONFIG wrapper.

The last sentence is stale: the bitmap is no longer passed to the wrapper.