Re: [RFC PATCH 3/7] coco/tdx-host: Exchange SPDM messages through DOE
From: Chao Gao
Date: Mon Nov 30 2026 - 07:53:36 EST
On Sat, Nov 28, 2026 at 05:47:46PM +0800, Xu Yilun wrote:
>> static int tdx_spdm_msg_exchange(struct tdx_tsm_link *tlink)
>
>I remember there is a comment in internal review that suggests we use
>struct pci_dev *pdev for this function, to explicit this is purly about
>PCI, nothing to do with TSM firmware. I accept it at that time and still
>feel good today. How do you think?
I would keep the tlink for this static function. The pdev and both
message buffers come from it, so with a pdev parameter the caller has
to pull every argument out of the tlink. The function relays the TDX
module's messages, so it cannot be made completely unrelated to the
TSM firmware. If other code without a tlink needs to call it later,
making it generic then is fine.