Archive-only list for patches
 help / color / mirror / Atom feed
* [PATCH v1 00/10] PCI/TSM: Support guest TSM drivers
@ 2026-11-23  8:33 Aneesh Kumar K.V (Arm)
  2026-11-23  8:33 ` [PATCH v1 01/10] PCI/TSM: Report active IDE streams per host bridge Aneesh Kumar K.V (Arm)
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Aneesh Kumar K.V (Arm) @ 2026-11-23  8:33 UTC (permalink / raw)
  To: linux-coco
  Cc: Aneesh Kumar K.V (Arm), Dan Williams, Leon Romanovsky,
	Bjorn Helgaas, Jason Gunthorpe, Jonathan Cameron, Xu Yilun,
	Alexey Kardashevskiy, Greg Kroah-Hartman, Rafael J . Wysocki,
	Steven Price, Suzuki K Poulose, Lukas Wunner, Ashish Kalra,
	Tom Lendacky, Herbert Xu, driver-core, linux-pci, kvm, patches

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/20260303000207.1836586-1-dan.j.williams@intel.com/
[2] https://lore.kernel.org/all/20260303000207.1836586-7-dan.j.williams@intel.com/
[3] https://lore.kernel.org/all/20260303000207.1836586-8-dan.j.williams@intel.com/
[4] https://lore.kernel.org/all/20260303000207.1836586-10-dan.j.williams@intel.com/
[5] https://lore.kernel.org/all/20260705220819.2472765-1-djbw@kernel.org/
[6] https://lore.kernel.org/all/20261105-device-trust-core-v1-0-1e536825b4eb@nvidia.com/
[7] https://lore.kernel.org/all/20261116081935.85372-1-aneesh.kumar@kernel.org/

Cc: Dan Williams <djbw@kernel.org>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
Cc: Xu Yilun <yilun.xu@linux.intel.com>
Cc: Alexey Kardashevskiy <aik@amd.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Steven Price <steven.price@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Ashish Kalra <ashish.kalra@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: driver-core@lists.linux.dev
Cc: linux-pci@vger.kernel.org
Cc: kvm@vger.kernel.org
Cc: patches@lists.linux.dev

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
-- 
2.43.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-11-23 13:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  8:33 [PATCH v1 00/10] PCI/TSM: Support guest TSM drivers Aneesh Kumar K.V (Arm)
2026-11-23  8:33 ` [PATCH v1 01/10] PCI/TSM: Report active IDE streams per host bridge Aneesh Kumar K.V (Arm)
2026-11-23  8:33 ` [PATCH v1 02/10] coco: tsm: Register the TSM class before device drivers Aneesh Kumar K.V (Arm)
2026-11-23  8:33 ` [PATCH v1 03/10] PCI/TSM: Let TSM drivers discover the CMA DOE mailbox Aneesh Kumar K.V (Arm)
2026-11-23  8:33 ` [PATCH v1 04/10] PCI/TSM: Defer TSM vDEVICE allocation until device setup completes Aneesh Kumar K.V (Arm)
2026-11-23  8:33 ` [PATCH v1 05/10] PCI/TSM: Add association locking helpers for evidence acceptance Aneesh Kumar K.V (Arm)
2026-11-23  8:33 ` [PATCH v1 06/10] PCI/TSM: Notify TSM drivers before waiting for TSM user references Aneesh Kumar K.V (Arm)
2026-11-23  8:33 ` [PATCH v1 07/10] device core: Add helpers to record confidential device acceptance Aneesh Kumar K.V (Arm)
2026-11-23  8:42   ` Greg Kroah-Hartman
2026-11-23  8:33 ` [PATCH v1 08/10] PCI/TSM: Add sysfs lock and unlock for guest-assigned devices Aneesh Kumar K.V (Arm)
2026-11-23  8:33 ` [PATCH v1 09/10] PCI/TSM: Build encrypted MMIO descriptors from a supplied report Aneesh Kumar K.V (Arm)
2026-11-23  8:33 ` [PATCH v1 10/10] PCI/TSM: Configure accepted device DMA during driver attachment Aneesh Kumar K.V (Arm)
2026-11-23  8:40 ` [PATCH v1 00/10] PCI/TSM: Support guest TSM drivers Greg Kroah-Hartman
2026-11-23  9:06   ` Leon Romanovsky
2026-11-23  9:43     ` Aneesh Kumar K.V
2026-11-23 11:58       ` Leon Romanovsky
2026-11-23 13:24         ` Aneesh Kumar K.V
2026-11-23 13:56           ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox