[RFC PATCH 7/7] x86/virt/tdx: Enable PCIe link encryption

From: Chao Gao

Date: Mon Nov 16 2026 - 06:34:22 EST


The basic SPDM session and IDE functionalities are all implemented,
configure the TDX Module to enable the TDISP feature and in turn enable
PCIe link encryption.

Based on work by Yilun.

Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx>
---
arch/x86/include/asm/tdx.h | 2 +-
arch/x86/virt/vmx/tdx/tdx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h
index add83e7b9c36..c051f2ae82e6 100644
--- a/arch/x86/include/asm/tdx.h
+++ b/arch/x86/include/asm/tdx.h
@@ -147,7 +147,7 @@ static inline bool tdx_supports_tdisp(const struct tdx_sys_info *sysinfo)
if (!(sysinfo->features.tdx_features0 & TDX_FEATURES0_TDXCONNECT))
return false;

- return false; /* To be enabled when kernel is ready */
+ return true;
}

int tdx_guest_keyid_alloc(void);
diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c
index d661de8230cf..9e87484283b8 100644
--- a/arch/x86/virt/vmx/tdx/tdx.c
+++ b/arch/x86/virt/vmx/tdx/tdx.c
@@ -1043,7 +1043,7 @@ struct tdmr_info_pa_array {
};

/* List all kernel-supported add-on features0 bits here */
-#define TDX_KERNEL_SUPPORTED_ADDON_FEATURES0 (0)
+#define TDX_KERNEL_SUPPORTED_ADDON_FEATURES0 (TDX_FEATURES0_TDXCONNECT)

static __init u64 get_tdx_usable_addon_features0(void)
{
--
2.52.0