Currently, there is no user interface to get the TDX Module version.
However, in bug reporting or analysis scenarios, the first question
normally asked is which TDX Module version is on your system, to determine
if this is a known issue or a new regression.
To address this issue, this series exposes the TDX Module version as
sysfs attributes of the tdx_host device [*].
This series is built on the VMX always-on series, which enables VMXON
during CPU bringup, and the "tdx_host" device, which creates a virtual
device to serve as the user interface for all TDX host features, e.g.,
TDX Connect.
The base-commit is:
https://git.kernel.org/pub/scm/linux/kernel/git/devsec/tsm.git/commit/?h=tdx&id=9332e088937f
[*]: https://lore.kernel.org/linux-coco/20250919142237.418648-2-dan.j.williams@intel.com/
Chao Gao (2):
x86/virt/tdx: Retrieve TDX module version
coco/tdx-host: Expose TDX module version
.../ABI/testing/sysfs-devices-faux-tdx-host | 6 +++++
MAINTAINERS | 1 +
arch/x86/include/asm/tdx_global_metadata.h | 7 ++++++
arch/x86/virt/vmx/tdx/tdx_global_metadata.c | 16 ++++++++++++
drivers/virt/coco/tdx-host/tdx-host.c | 25 ++++++++++++++++++-
5 files changed, 54 insertions(+), 1 deletion(-)
create mode 100644 Documentation/ABI/testing/sysfs-devices-faux-tdx-host
--
2.47.3