On Thu, Oct 22, 2026 at 05:38:22PM +0200, Jiri Pirko wrote:
quoted
I am using this to understand what the IDE setup flow would look like,
but it is unclear whether the connect flow belongs in an attestation
framework. I understand the desire to pass the certificate slot number
as part of connect, and sysfs is probably not a suitable interface for
that. However, is CTLV the interface we want to use for connect?
I was thinking about this and "connect" really does not belong in the
attestation CTLV (same applies to "lock"). I was thinking about some
parallel PCITSM CTLV instance, but that does not really click as well.
Currently I'm thinking we can maintain existing "connect" in sysfs and
extend it with "lock" sysfs knob for Realm side. Both would create
ctlv-attestation-spdm instance. The same spdm instance may be created
for other non-PCI-backed device.
The proposed host flow is:
sysfs connect: select tsmN and prepare the connection
-> negotiate SPDM and discover certificates
-> register ctlv-attestation-spdm instance in DISCOVERED state
SPDM_GET
-> populated certificate slots and digests
EVIDENCE_GET(CERT_CHAIN, blob-instance=slot) /*optional*/
-> retrieve candidate certificate chain for appraisal
SPDM_AUTHENTICATE(device-generation, spdm-slot=selected_slot)
-> authenticate the selected chain
-> complete backend-required session and IDE setup
sysfs disconnect
-> remove the attestation instance
-> destroy the native connection
This made sense to me, I haven't reached all the details of SPDM, but
this is like what we discussed at LPC.
I don't know how much SPDM stuff is done at 'sysfs connect' time vs
how much is done at the first request. None of that leaks to UAPI so
it doesn't matter.
This changes things so IDE does not setup until SPDM_AUTHENTICATE,
which seems reasonable to me given all the constraints.
The slot is therefore selected after discovery, rather than supplied to
connect. The attestation instance represents the prepared connection; it
does not exist beforehand as a controller for a disconnected PCI function.
This requires a staged native backend. It is not how existing automatic
sysfs connect behaves today, and those backends would retain their
existing behavior.
I don't know what we do with the half completed sev stuff. I would
prefer everything align to the same flow, obviously.
quoted
# ./ctlvctl/ctlvctl --spec-dir=./specs/ exec ctlv0 connect pci.generation=0 pci.tsm-id=0
It is pretty cool you could just make some edits to the schema and
then use them through this general tool, kinda like sysfs, but not
like sysfs.
Jason