PCI/TSM: Support guest TSM drivers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest10 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | PCI/TSM: Report active IDE streams per host bridgeDocumentation/ drivers/ drivers/ +2 more | +118 | 0 replies | |
| 2/10 | coco: tsm: Register the TSM class before device driversdrivers/ | +1 | 1 reply | |
| 3/10 | PCI/TSM: Let TSM drivers discover the CMA DOE mailboxdrivers/ drivers/ include/ | +29 | 0 replies | |
| 4/10 | PCI/TSM: Defer TSM vDEVICE allocation until device setup completesdrivers/ include/ | +40 | 0 replies | |
| 5/10 | PCI/TSM: Add association locking helpers for evidence acceptancedrivers/ include/ | +83 | 1 reply | |
| 6/10 | PCI/TSM: Notify TSM drivers before waiting for TSM user referencesdrivers/ drivers/ include/ | +59 | 0 replies | |
| 7/10 | device core: Add helpers to record confidential device acceptanceMAINTAINERS drivers/ drivers/ +3 more | +105 | 1 reply | |
| 8/10 | PCI/TSM: Add sysfs lock and unlock for guest-assigned devicesDocumentation/ Documentation/ Documentation/ +4 more | +401 | 1 reply | |
| 9/10 | PCI/TSM: Build encrypted MMIO descriptors from a supplied reportdrivers/ include/ include/ | +263 | 0 replies | |
| 10/10 | PCI/TSM: Configure accepted device DMA during driver attachmentdrivers/ drivers/ include/ +1 more | +152 | 0 replies |
Reviews trailers per patch
1 of 10 patches has a Reviewed-by or Acked-by.
| Patch | Xu Yilun |
|---|---|
| 1/10 | R-b |
| 2/10 | |
| 3/10 | |
| 4/10 | |
| 5/10 | |
| 6/10 | |
| 7/10 | |
| 8/10 | |
| 9/10 | |
| 10/10 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 00/10] PCI/TSM: Support guest TSM drivers
This series adds the PCI/TSM support needed by a TEE Security Manager (TSM) driver in a confidential guest. It adds device lock/unlock, helpers for recording device acceptance and parsing MMIO reports, and DMA callbacks used during PCI driver attachment. The guest TSM driver and attestation commands using these interfaces are in follow-up series.
This series is based on Dan Williams' "[PATCH v2 00/19] PCI/TSM: TEE I/O infrastructure" posting [1], particularly the guest LOCK/UNLOCK, ACCEPT and MMIO report work [2-4]. It retains device_cc_accepted() and the confidential-device acceptance model from that posting, with changes adapted to the current PCI/TSM structures and reference APIs. Dan's device-core acceptance helper and per-host-bridge IDE stream reporting patch are also included.
This series does not adopt the Device Trust changes from Dan's "Device Evidence and Trust for PCI Security Protocol (TDISP)" [5]. That work is being developed separately in Leon Romanovsky's "driver core: Authorize device trust before driver binding" series, [6]. Confidential-device acceptance is kept separate from that driver-binding trust policy.
The guest flow separates three operations:
* Lock the device through tsm/lock. This requests the TEE Device Interface Security Protocol (TDISP) LOCKED state, so userspace can verify evidence about the locked configuration. Unlock releases the device configuration and the TSM driver's per-device state. Neither operation is permitted while a PCI driver is attached.
* Request device use through the attestation evidence-accept operation. A follow-up guest TSM driver validates the reported MMIO mappings, requests TDISP RUN and marks the device accepted. This series supplies the device acceptance state, MMIO report helpers and PCI/TSM locking helpers needed for that work.
* Enable DMA during PCI driver attachment, after platform DMA configuration and IOMMU setup, before the PCI driver's probe function. Disable DMA during driver detach and setup cleanup. Hold TSM user, device and module references until DMA cleanup finishes calling the TSM driver.
Compared with the earlier posting, evidence retrieval and acceptance use attestation rather than PCI/TSM evidence storage and the sysfs accept attribute.
This series is based on the IOMMUFD/TSM vIOMMU and vDEVICE work [7]. It uses that series' TSM references, unregister waits and struct pci_tsm_context references. The architecture-specific CCA host and guest drivers and their SPDM attestation operations are in separate follow-up series.
The full patchset, including attestation, Device Trust, IOMMUFD, guest_memfd and the Arm CCA host and guest changes, is available at:
https://git.gitlab.arm.com/linux-arm/linux-cca.git
branch: cca/topics/7.4/cca-da-integration-v1
Notes:
* Codex assisted with implementation, review and series organization.
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://lore.kernel.org/all/[email protected]/
[4] https://lore.kernel.org/all/[email protected]/
[5] https://lore.kernel.org/all/[email protected]/
[6] https://lore.kernel.org/all/[email protected]/
[7] https://lore.kernel.org/all/[email protected]/
Aneesh Kumar K.V (Arm) (9):
coco: tsm: Register the TSM class before device drivers PCI/TSM: Let TSM drivers discover the CMA DOE mailbox PCI/TSM: Defer TSM vDEVICE allocation until device setup completes PCI/TSM: Add association locking helpers for evidence acceptance PCI/TSM: Notify TSM drivers before waiting for TSM user references device core: Add helpers to record confidential device acceptance PCI/TSM: Add sysfs lock and unlock for guest-assigned devices PCI/TSM: Build encrypted MMIO descriptors from a supplied report PCI/TSM: Configure accepted device DMA during driver attachment
Dan Williams (1):
PCI/TSM: Report active IDE streams per host bridge
Documentation/ABI/testing/sysfs-bus-pci | 35 +- Documentation/ABI/testing/sysfs-class-tsm | 32 + Documentation/driver-api/pci/tsm.rst | 47 ++ MAINTAINERS | 1 + drivers/base/Kconfig | 4 + drivers/base/Makefile | 1 + drivers/base/base.h | 9 + drivers/base/coco.c | 68 ++ drivers/crypto/ccp/sev-dev-tsm.c | 7 + drivers/pci/Kconfig | 2 + drivers/pci/ide.c | 4 + drivers/pci/pci-driver.c | 31 +- drivers/pci/tsm.c | 749 ++++++++++++++++++++-- drivers/virt/coco/tsm-core.c | 150 ++++- include/linux/device.h | 22 + include/linux/ioport.h | 1 + include/linux/pci-ide.h | 2 + include/linux/pci-tsm.h | 130 +++- include/linux/pci.h | 1 + include/linux/tsm.h | 4 + 20 files changed, 1248 insertions(+), 52 deletions(-) create mode 100644 drivers/base/coco.c
base-commit: 65e4fd942f72a9dba0e4e257290c4fa1aa756854
prerequisite-patch-id: 121492d71cc22b2adbfdedd668868c5a449ad764
prerequisite-patch-id: 266d2641e47ccf8f57f8ca77d90d193f9cfabbbd
prerequisite-patch-id: 5502ecfa0b2659885b221f103d44d473c72fec03
prerequisite-patch-id: 6ec85de28f71ce761596e493a68a56242327c0b1
prerequisite-patch-id: f6e97602a5b06ffddd2cd3c2815bed27411d51e3
prerequisite-patch-id: 03d76de408efeb5a2205079bb61face09255ca60
prerequisite-patch-id: 51872ad4fcd244f3425b81f5a0f05acd4ffa5c39
prerequisite-patch-id: b56e823a40dc6d1e70e74a00cf3e1da2d0ecc9d7
prerequisite-patch-id: 53dcbe1d39b6848f778eba736a2779b0e587cfcb
prerequisite-patch-id: 66c884ec28e3d15a174dfb288858b174fb21480d
prerequisite-patch-id: 18a7425cf79e0a14ac934cb2a194b27a62d50c9d
prerequisite-patch-id: e47eb53d14d6f6180eb0606d721bfd55d74c96b3
prerequisite-patch-id: ce898fc01b883c3318a6bdb883578b8b4e4299a2
prerequisite-patch-id: 416778d72f4ade8c0f13b9fe3e619ec9d5e9634b
prerequisite-patch-id: d30d30bbe67196c41b592e79fd0c15a78bec0ae7
Signature · 1 line
2.43.0