@@ -621,3 +621,84 @@ Description:
621621 number extended capability. The file is read only and due to
622622 the possible sensitivity of accessible serial numbers, admin
623623 only.
624+
625+ What: /sys/bus/pci/devices/.../tsm/
626+ Contact: linux-coco@lists.linux.dev
627+ Description:
628+ This directory only appears if a physical device function
629+ supports authentication (PCIe CMA-SPDM), interface security
630+ (PCIe TDISP), and is accepted for secure operation by the
631+ platform TSM driver. This attribute directory appears
632+ dynamically after the platform TSM driver loads. So, only after
633+ the /sys/class/tsm/tsm0 device arrives can tools assume that
634+ devices without a tsm/ attribute directory will never have one;
635+ before that, the security capabilities of the device relative to
636+ the platform TSM are unknown. See
637+ Documentation/ABI/testing/sysfs-class-tsm.
638+
639+ What: /sys/bus/pci/devices/.../tsm/connect
640+ Contact: linux-coco@lists.linux.dev
641+ Description:
642+ (RW) Write the name of a TSM (TEE Security Manager) device from
643+ /sys/class/tsm to this file to establish a connection with the
644+ device. This typically includes an SPDM (DMTF Security
645+ Protocols and Data Models) session over PCIe DOE (Data Object
646+ Exchange) and may also include PCIe IDE (Integrity and Data
647+ Encryption) establishment. Reads from this attribute return the
648+ name of the connected TSM or the empty string if not
649+ connected. A TSM device signals its readiness to accept PCI
650+ connection via a KOBJ_CHANGE event.
651+
652+ What: /sys/bus/pci/devices/.../tsm/disconnect
653+ Contact: linux-coco@lists.linux.dev
654+ Description:
655+ (WO) Write the name of the TSM device that was specified
656+ to 'connect' to teardown the connection.
657+
658+ What: /sys/bus/pci/devices/.../tsm/dsm
659+ Contact: linux-coco@lists.linux.dev
660+ Description: (RO) Return PCI device name of this device's DSM (Device
661+ Security Manager). When a device is in the connected state it
662+ indicates that the platform TSM (TEE Security Manager) has made
663+ a secure-session connection with a device's DSM. A DSM is always
664+ physical function 0 and when the device supports TDISP (TEE
665+ Device Interface Security Protocol) its managed functions also
666+ populate this tsm/dsm attribute. The managed functions of a DSM
667+ are SR-IOV (Single Root I/O Virtualization) virtual functions,
668+ non-zero functions of a multi-function device, or downstream
669+ endpoints depending on whether the DSM is an SR-IOV physical
670+ function, function0 of a multi-function device, or an upstream
671+ PCIe switch port. This is a "link" TSM attribute, see
672+ Documentation/ABI/testing/sysfs-class-tsm.
673+
674+ What: /sys/bus/pci/devices/.../tsm/bound
675+ Contact: linux-coco@lists.linux.dev
676+ Description: (RO) Return the device name of the TSM when the device is in a
677+ TDISP (TEE Device Interface Security Protocol) operational state
678+ (LOCKED, RUN, or ERROR, not UNLOCKED). Bound devices consume
679+ platform TSM resources and depend on the device's configuration
680+ (e.g. BME (Bus Master Enable) and MSE (Memory Space Enable)
681+ among other settings) to remain stable for the duration of the
682+ bound state. This attribute is only visible for devices that
683+ support TDISP operation, and it is only populated after
684+ successful connect and TSM bind. The TSM bind operation is
685+ initiated by VFIO/IOMMUFD. This is a "link" TSM attribute, see
686+ Documentation/ABI/testing/sysfs-class-tsm.
687+
688+ What: /sys/bus/pci/devices/.../authenticated
689+ Contact: linux-pci@vger.kernel.org
690+ Description:
691+ When the device's tsm/ directory is present device
692+ authentication (PCIe CMA-SPDM) and link encryption (PCIe IDE)
693+ are handled by the platform TSM (TEE Security Manager). When the
694+ tsm/ directory is not present this attribute reflects only the
695+ native CMA-SPDM authentication state with the kernel's
696+ certificate store.
697+
698+ If the attribute is not present, it indicates that
699+ authentication is unsupported by the device, or the TSM has no
700+ available authentication methods for the device.
701+
702+ When present and the tsm/ attribute directory is present, the
703+ authenticated attribute is an alias for the device 'connect'
704+ state. See the 'tsm/connect' attribute for more details.
0 commit comments