RE: [PATCH v2 25/31] x86/virt/tdx: Add SEAMCALL wrappers for SPDM management

Tian, Kevin
2026-04-09T07:59:55Z

> From: Xu Yilun <yilun.xu@linux.intel.com>
> Sent: Saturday, March 28, 2026 12:01 AM
>

here ...

> - TDH.SPDM.MNG supports three SPDM runtime operations: HEARTBEAT,
> KEY_UPDATE and DEV_INFO_RECOLLECTION.

... but the actual helper just pass whatever ops to TDX module

> +u64 tdh_exec_spdm_mng(u64 spdm_id, u64 spdm_op, struct page
> *spdm_param,
> + struct page *spdm_rsp, struct page *spdm_req,
> + struct tdx_page_array *spdm_out,
> + u64 *spdm_req_or_out_len)
> +{
> + struct tdx_module_args args = {
> + .rcx = spdm_id,
> + .rdx = spdm_op,
> + .r8 = spdm_param ? page_to_phys(spdm_param) : -1,
> + .r9 = page_to_phys(spdm_rsp),
> + .r10 = page_to_phys(spdm_req),
> + .r11 = spdm_out ? hpa_array_t_assign_raw(spdm_out) : -1,
> + };
> + u64 r;
> +
> + r = seamcall_ret_ir_exec(TDH_SPDM_MNG, &args);
> +
> + *spdm_req_or_out_len = args.rcx;
> +
> + return r;
> +}
> +EXPORT_SYMBOL_FOR_MODULES(tdh_exec_spdm_mng, "tdx-host");