]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
coco/tdx-host: Introduce a "tdx_host" device
authorChao Gao <chao.gao@intel.com>
Wed, 20 May 2026 22:28:52 +0000 (15:28 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 3 Jun 2026 15:14:51 +0000 (08:14 -0700)
commit59783353467958517a3e511394d7ab3aed03bc6a
tree105bca29b97cb770e2e8ce04e0c08e7f85c3b69f
parent2e41297bfa035fa1cf1530d5ceecf58c527b6277
coco/tdx-host: Introduce a "tdx_host" device

TDX depends on a platform firmware module that runs on the CPU.
Unlike other CoCo architectures, TDX has no hardware "device"
running the show, just a blob on the CPU.

Create a virtual device to anchor interactions with this platform
firmware. This lets later code:

 - expose metadata: TDX module version, seamldr version, to userspace
   as device attributes

 - implement firmware uploader APIs (which are tied to a device) to
   support TDX module runtime updates

Use a faux device because the TDX module is singular within the system
and has no platform resources. Using a faux device eliminates the need
to create a stub bus.

The call to tdx_get_sysinfo() ensures that the TDX module is ready to
provide services.

Note that AMD has a PCI device for the PSP for SEV and ARM CCA will
likely have a faux device [1].

Thanks to Dan and Yilun for all the help on this one.

[ dhansen: trim changelog ]

Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Tony Lindgren <tony.lindgren@linux.intel.com>
Reviewed-by: Xu Yilun <yilun.xu@linux.intel.com>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/all/2025073035-bulginess-rematch-b92e@gregkh/
Link: https://patch.msgid.link/20260520133909.409394-7-chao.gao@intel.com
arch/x86/virt/vmx/tdx/tdx.c
drivers/virt/coco/Kconfig
drivers/virt/coco/Makefile
drivers/virt/coco/tdx-host/Kconfig [new file with mode: 0644]
drivers/virt/coco/tdx-host/Makefile [new file with mode: 0644]
drivers/virt/coco/tdx-host/tdx-host.c [new file with mode: 0644]