Re: [PATCH v3 23/26] x86/virt/tdx: Enable TDX Module runtime updates

From: Tony Lindgren

Date: Mon Jan 26 2026 - 06:14:43 EST


On Fri, Jan 23, 2026 at 06:55:31AM -0800, Chao Gao wrote:
> --- a/arch/x86/include/asm/tdx.h
> +++ b/arch/x86/include/asm/tdx.h
> @@ -32,6 +32,9 @@
> #define TDX_SUCCESS 0ULL
> #define TDX_RND_NO_ENTROPY 0x8000020300000000ULL
>
> +/* Bit definitions of TDX_FEATURES0 metadata field */
> +#define TDX_FEATURES0_TD_PRESERVING BIT(1)
> +#define TDX_FEATURES0_NO_RBP_MOD BIT(18)
> #ifndef __ASSEMBLER__
>
> #include <uapi/asm/mce.h>

How about let's put these defines into arch/x86/include/asm/shared/tdx.h
instead? And use BIT_ULL?

This would allow cleaning up arch/x86/kvm/vmx/tdx.c in a follow-up patch
for MD_FIELD_ID_FEATURES0_TOPOLOGY_ENUM to use TDX_FEATURES0_TOPOLOGY_ENUM
BIT_ULL(20).

Of course it can be done later on too, so:

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