Re: [RFC PATCH 02/15] x86/tdx: Add TDCM hypercall wrapper for TDX Connect

From: Nikolay Borisov

Date: Tue Oct 13 2026 - 14:18:38 EST




On 24.09.26 г. 7:10 ч., Zhenzhong Duan wrote:
TDX Connect is a TDX feature that enables secure device assignment,
allowing a TDX guest to directly interact with TEE-IO capable devices.

The TEE-IO Device Control and Management (TDCM) hypercall
(TDG.VP.VMCALL<TDCM>, defined in TDX GHCI v2.0 specification) is the
primary interface through which a TDX guest issues device management
commands to the host. The host processes these commands and returns
responses via a shared memory buffer.

This patch contradicts what's going in patch 5. Because you make it sound as if TDCM is yet another leaf of VP.VMCALL, but then in patch 5 you introduce the polling code to read the result. And there is not enough information in the changelogs to understand why this added complexity is needed. Isn't TDCM handled synchronously by the VMM as the rest of the tdcalls, is it perhaps handled by TDX NRX module?


Abstract the underlying leaf call and pass the shared buffer physical
address as a decrypted mapping. Add a runtime page alignment check
for the buffer to enforce correct usage.

<snip>