Skip to content

coco/TSM: Host-side Arm CCA IDE setup via connect/disconnect callbacks

Aneesh Kumar K.V (Arm) kvmarm linux-arm-kernel linux-coco lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest15 patches 3 repliesIn review
  2. v4 RFC14 patches 6 repliesSuperseded
  3. v3 RFC10 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 2/212 patches21 repliesSuperseded
v2 posting 1/212 patches1 replySuperseded

Changes in v5 from the cover letter

https://lore.kernel.org/all/[email protected]
* Update rmi_set_pub_key() based on the latest specification.
* Rename structure members to match the specification.
* Rebase on top of the latest dependent series.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15coco: host: arm64: Prepare host TSM plumbing for IDE streamsdrivers/firmware/arm_rmm/rmi.c drivers/firmware/smccc/smccc.c drivers/virt/coco/Kconfig +5 more+273 -20 replies
2/15coco: host: arm64: Create RMM pdev objects for PCI endpointsdrivers/virt/coco/arm-cca-host/Makefile drivers/virt/coco/arm-cca-host/rmi-da.c drivers/virt/coco/arm-cca-host/rmi-da.h +2 more+227 -10 replies
3/15coco: host: arm64: Add RMM pdev communication plumbingdrivers/virt/coco/arm-cca-host/main.c drivers/virt/coco/arm-cca-host/rmi-da.c drivers/virt/coco/arm-cca-host/rmi-da.h +2 more+473 -00 replies
4/15coco: host: arm64: Add RMM pdev stop and destroy helperdrivers/virt/coco/arm-cca-host/rmi-da.c drivers/virt/coco/arm-cca-host/rmi-da.h include/linux/arm-rmi-cmds.h+56 -10 replies
5/15X.509: Make certificate parser publiccrypto/asymmetric_keys/x509_parser.h include/keys/x509-parser.h+56 -410 replies
6/15X.509: Parse Subject Alternative Name in certificatescrypto/asymmetric_keys/x509_cert_parser.c include/keys/x509-parser.h+11 -00 replies
7/15X.509: Move certificate length retrieval into new helpercrypto/asymmetric_keys/x509_loader.c include/keys/asymmetric-type.h+28 -120 replies
8/15coco: host: arm64: Register device public key with RMMdrivers/virt/coco/arm-cca-host/Kconfig drivers/virt/coco/arm-cca-host/rmi-da.c drivers/virt/coco/arm-cca-host/rmi-da.h +2 more+188 -00 replies
9/15coco: host: arm64: Initialize RMM pdev state for TDISP IDE connectdrivers/virt/coco/arm-cca-host/main.c drivers/virt/coco/arm-cca-host/rmi-da.c drivers/virt/coco/arm-cca-host/rmi-da.h+130 -100 replies
10/15coco: host: arm64: Coordinate peer stream waits during pdev communicationdrivers/virt/coco/arm-cca-host/rmi-da.c drivers/virt/coco/arm-cca-host/rmi-da.h include/linux/arm-smccc-rmi.h+125 -50 replies
11/15coco: host: arm64: Connect RMM pdev streams for IDE devicesdrivers/virt/coco/arm-cca-host/main.c drivers/virt/coco/arm-cca-host/rmi-da.c drivers/virt/coco/arm-cca-host/rmi-da.h +2 more+293 -13 replies
12/15coco: host: arm64: Refcount root-port pdevs used by IDE streamsdrivers/virt/coco/arm-cca-host/main.c drivers/virt/coco/arm-cca-host/rmi-da.h+32 -30 replies
13/15PCI/TSM: Move CMA DOE mailbox discovery out of pci_tsm_pf0_constructor()drivers/crypto/ccp/sev-dev-tsm.c drivers/pci/tsm.c drivers/virt/coco/arm-cca-host/main.c+32 -90 replies
14/15coco: host: arm64: Add NCOH_SYS stream support for RC endpointsdrivers/virt/coco/arm-cca-host/main.c drivers/virt/coco/arm-cca-host/rmi-da.c+38 -00 replies
15/15coco: host: arm64: Enable PCI TSM connect callbacksdrivers/virt/coco/arm-cca-host/main.c+4 -20 replies

Reviews trailers per patch

3 of 15 patches have a Reviewed-by or Acked-by.

PatchDan WilliamsIlpo JärvinenJonathan CameronWilfred Mallawa
1/15
2/15
3/15
4/15
5/15R-b R-b R-b
6/15A-b R-b R-b R-b
7/15R-b R-b
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/15] coco/TSM: Host-side Arm CCA IDE setup via connect/disconnect callbacks

This patch series implements the TSM ->connect() and ->disconnect() callbacks required for the Arm CCA IDE setup as per the RMM 2.0bet3 specification [1].

This patchset includes the host-side flow needed by connect/disconnect, including:
- DA feature detection helpers
- host TSM callback wiring and IDE stream allocation support
- creation/registration of RMM pdev descriptors
- RMM pdev communication helpers
- pdev stop and teardown helpers for disconnect
- pdev instantiation from the connect path
- public key registration with RMM

To support public-key handling from the device certificate chain, the series also includes the required X.509 parser updates.

Testing / Usage

To initiate the IDE setup:
echo tsm0 > /sys/bus/pci/devices/$DEVICE/tsm/connect

To disconnect:
echo tsm0 > /sys/bus/pci/devices/$DEVICE/tsm/disconnect

The series is based on:
- https://lore.kernel.org/all/[email protected]
- https://lore.kernel.org/all/[email protected]

Changes from v4:
https://lore.kernel.org/all/[email protected]
* Update rmi_set_pub_key() based on the latest specification.
* Rename structure members to match the specification.
* Rebase on top of the latest dependent series.

Changes from v3:
https://lore.kernel.org/all/[email protected]
* updated the patches to follow the RMM 2.0bet1 specification
* reworked the host-side pdev lifecycle to better match the RMM 2.0bet1 flow, including common pdev state, root-port pdev support, and non-coherent stream setup and teardown
* split PF0 setup into identity collection and conditional public-key installation, and gate DA enablement on RMI_FEATURE_REGISTER_2_DA
* added coordinated handling for RMI_DEV_COMM_EXIT_STREAM_WAIT, along with stream connect/disconnect and stream key refresh/purge support during vdev teardown

Changes from v2:
rfc-v2 https://lore.kernel.org/all/[email protected]
* rebase to latest kernel and core TSM changes
* Address review feedback.

v1:
rfc-v1 https://lore.kernel.org/all/[email protected]

[1] https://developer.arm.com/documentation/den0137/2-0bet3/
[2] https://lore.kernel.org/all/[email protected]
[3] https://lore.kernel.org/all/[email protected]
[4] https://gitlab.arm.com/linux-arm/linux-cca.git cca/topics/cca-tdisp-upstream-rfc-v4

Cc Alexey Kardashevskiy <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Dan Williams <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Marc Zyngier <[email protected]>
Cc Samuel Ortiz <[email protected]>
Cc Steven Price <[email protected]>
Cc Suzuki K Poulose <[email protected]>
Cc Will Deacon <[email protected]>
Cc Xu Yilun <[email protected]>

Aneesh Kumar K.V (Arm) (12):
coco: host: arm64: Prepare host TSM plumbing for IDE streams
coco: host: arm64: Create RMM pdev objects for PCI endpoints
coco: host: arm64: Add RMM pdev communication plumbing
coco: host: arm64: Add RMM pdev stop and destroy helper
coco: host: arm64: Register device public key with RMM
coco: host: arm64: Initialize RMM pdev state for TDISP IDE connect
coco: host: arm64: Coordinate peer stream waits during pdev
communication
coco: host: arm64: Connect RMM pdev streams for IDE devices
coco: host: arm64: Refcount root-port pdevs used by IDE streams PCI/TSM: Move CMA DOE mailbox discovery out of
pci_tsm_pf0_constructor()
coco: host: arm64: Add NCOH_SYS stream support for RC endpoints
coco: host: arm64: Enable PCI TSM connect callbacks

Lukas Wunner (3):
X.509: Make certificate parser public
X.509: Parse Subject Alternative Name in certificates X.509: Move certificate length retrieval into new helper

 crypto/asymmetric_keys/x509_cert_parser.c |   9 +
 crypto/asymmetric_keys/x509_loader.c      |  38 +-
 crypto/asymmetric_keys/x509_parser.h      |  42 +-
 drivers/crypto/ccp/sev-dev-tsm.c          |  13 +
 drivers/firmware/arm_rmm/rmi.c            |   4 +-
 drivers/firmware/smccc/smccc.c            |   6 +
 drivers/pci/tsm.c                         |  13 +-
 drivers/virt/coco/Kconfig                 |   2 +
 drivers/virt/coco/Makefile                |   1 +
 drivers/virt/coco/arm-cca-host/Kconfig    |  26 +
 drivers/virt/coco/arm-cca-host/Makefile   |   5 +
 drivers/virt/coco/arm-cca-host/main.c     | 461 ++++++++++++
 drivers/virt/coco/arm-cca-host/rmi-da.c   | 859 ++++++++++++++++++++++
 drivers/virt/coco/arm-cca-host/rmi-da.h   | 217 ++++++
 include/keys/asymmetric-type.h            |   2 +
 include/keys/x509-parser.h                |  57 ++
 include/linux/arm-rmi-cmds.h              |  85 +++
 include/linux/arm-smccc-rmi.h             | 161 ++++
 18 files changed, 1940 insertions(+), 61 deletions(-)
 create mode 100644 drivers/virt/coco/arm-cca-host/Kconfig
 create mode 100644 drivers/virt/coco/arm-cca-host/Makefile
 create mode 100644 drivers/virt/coco/arm-cca-host/main.c
 create mode 100644 drivers/virt/coco/arm-cca-host/rmi-da.c
 create mode 100644 drivers/virt/coco/arm-cca-host/rmi-da.h
 create mode 100644 include/keys/x509-parser.h
Signature · 1 line
2.43.0