[PATCH v3 7/8] x86/virt/tdx: Enable the quoting extension
From: Peter Fang
Date: Fri Dec 04 2026 - 13:23:01 EST
The quoting extension generates TDX attestation Quotes in the TDX
module, without a separate host service. Enable this feature by
requesting it at TDX init when configuring the module.
For simplicity, when there is no Dynamic PAMT, the kernel enables every
recognizable add-on feature that the TDX module supports. So add quoting
to the list of add-on features. And once it's enabled, runtime module
updates guarantee it keeps working.
KVM expects the TDX module to support quoting on every logical CPU at
the same time. This takes about 40KB of memory per logical CPU. On a
large system with more than 1024 logical CPUs, this consumes tens of
megabytes of host RAM [1].
Signed-off-by: Peter Fang <peter.fang@xxxxxxxxx>
Link: https://lore.kernel.org/all/DS4PPFA84FA90FC58F88D79B0EF19B34596E7832@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ # [1]
---
v3:
- Enable through kernel-supported add-on features.
- Don't explicitly request quoting in TDH.SYS.UPDATE.
- Drop the "Quoting engine" term. [Nikolay]
- Drop Tony's Reviewed-by, as the code changed substantially.
---
arch/x86/virt/vmx/tdx/tdx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c
index c958fdac3c2a6..87d7305313536 100644
--- a/arch/x86/virt/vmx/tdx/tdx.c
+++ b/arch/x86/virt/vmx/tdx/tdx.c
@@ -1034,7 +1034,7 @@ static __init int construct_tdmrs(struct list_head *tmb_list,
#define TDX_SYS_CONFIG_DYNAMIC_PAMT BIT(16)
/* List kernel-supported add-on features0 bits here */
-#define TDX_KERNEL_SUPPORTED_ADDON_FEATURES0 (0)
+#define TDX_KERNEL_SUPPORTED_ADDON_FEATURES0 (TDX_FEATURES0_QUOTE)
static u64 get_tdx_usable_addon_features0(void)
{
--
2.53.0