Re: [RFC PATCH 3/7] coco/tdx-host: Exchange SPDM messages through DOE
From: Xu Yilun
Date: Sat Nov 28 2026 - 07:53:10 EST
On Wed, Nov 25, 2026 at 05:48:36PM +0000, Edgecombe, Rick P wrote:
> On Wed, 2026-11-25 at 20:12 +0800, Chao Gao wrote:
> > static int tdx_spdm_msg_exchange(struct tdx_tsm_link *tlink)
> > {
> > struct pci_dev *pdev = tlink->pci.base_tsm.pdev;
> > int ret;
> >
> > ret = pci_doe_raw(tlink->pci.doe_mb,
> > page_address(tlink->out_msg), PAGE_SIZE,
> > page_address(tlink->in_msg), PAGE_SIZE);
> > if (ret < 0) {
> > pci_err(pdev, "spdm msg exchange fail %d\n", ret);
> > return ret;
> > }
> >
> > return 0;
> > }
>
> If the DOE people are ok with this, it does seem much better to me on our side.
I'm not the DOE people but I have some concern about this raw
transfering interface. The kernel manages the DOE layer, the PCI DOE
capability and the discovery protocol.. The firmware has no access
these info. It is questionable that the firmware constructs the DOE
packet without knowing all the info. Even today the firmware can
blindly fill the packet right, no guarantee it still can as the
discovery protocol version advances.
I lean to not having TDX module create the DOE header. Let the kernel
do it.