Re: [RFC PATCH 2/7] coco/tdx-host: Establish an SPDM session with the device
From: Xu Yilun
Date: Sat Nov 28 2026 - 04:46:17 EST
> >> +#define SPDM_CAP_HBEAT BIT(13)
> >> +#define SPDM_CAP_KEY_UPD BIT(14)
> >> +
> >> +struct spdm_config_info_t {
> >> + u32 vmm_spdm_cap;
> >> + u8 spdm_session_policy;
> >> + u8 certificate_slot_mask;
> >> + u8 raw_bitstream_requested;
> >> + u8 reserved[4089];
> >> +} __packed;
> >
> >This looks like more SPDM specific stuff in TDX. Do really know other vendors
> >need it? We should at least group it in a header such that it is clear which
> >things are SPDM spec and which are TDX.
>
> This structure is not from the SPDM spec. It is an ABI structure
> defined by the TDX module, and it is passed to TDH.SPDM.CONNECT.
>
> But yes, there is some SPDM-specific stuff in this series. I will try
> to separate it from the TDX stuff.
[...]
> >> + spdm_conf->certificate_slot_mask = 0xff;
> >
> >Can we not have the magic number? I guess it means any?
>
> Sure, will remove the magic number. 0xff means getting the
> certificates in all slots (0-7) of the device.
>
> As a heads-up, this code will go away anyway when we switch to the new
> CTLV attestation framework.
So it seems we don't need any spdm_config_info_t definition for now.
Should we keep the definition or just to provide a zero page to avoid
unnecessary explanations here?