From: Chao Gao Date: Wed, 20 May 2026 22:29:13 +0000 (-0700) Subject: x86/virt/tdx: Enable TDX module runtime updates X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1e35f5945db9630c0602d9a9a7bbd146a96d13cc;p=thirdparty%2Fkernel%2Flinux.git x86/virt/tdx: Enable TDX module runtime updates All pieces of TDX module runtime updates are in place. Enable it if it is supported. Signed-off-by: Chao Gao Signed-off-by: Dave Hansen Reviewed-by: Xu Yilun Reviewed-by: Tony Lindgren Reviewed-by: Kiryl Shutsemau (Meta) Reviewed-by: Rick Edgecombe Link: https://patch.msgid.link/20260520133909.409394-24-chao.gao@intel.com --- diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h index 5d750fe53669c..e5a9cf656c072 100644 --- a/arch/x86/include/asm/tdx.h +++ b/arch/x86/include/asm/tdx.h @@ -33,6 +33,7 @@ #define TDX_RND_NO_ENTROPY 0x8000020300000000ULL /* Bit definitions of TDX_FEATURES0 metadata field */ +#define TDX_FEATURES0_TD_PRESERVING BIT_ULL(1) #define TDX_FEATURES0_NO_RBP_MOD BIT_ULL(18) #ifndef __ASSEMBLER__ @@ -113,8 +114,7 @@ const struct tdx_sys_info *tdx_get_sysinfo(void); static inline bool tdx_supports_runtime_update(const struct tdx_sys_info *sysinfo) { - /* To be enabled when kernel is ready. */ - return false; + return sysinfo->features.tdx_features0 & TDX_FEATURES0_TD_PRESERVING; } int tdx_guest_keyid_alloc(void);