public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64/virt: Add Arm CCA measurement register support
@ 2026-04-13  8:49 Sami Mujawar
  2026-04-13  8:49 ` [PATCH 1/3] arm64: rsi: Add helpers for Arm CCA measurement register operations Sami Mujawar
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Sami Mujawar @ 2026-04-13  8:49 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: catalin.marinas, will, jgg, thuth, Suzuki.Poulose, steven.price,
	gshan, YeoReum.Yun, Sami Mujawar

This series adds support for Arm Confidential Compute Architecture (CCA)
measurement registers in the Linux kernel, enabling guest Realms to
access, extend, and expose measurement values for attestation and runtime
integrity tracking.

The Realm Management Monitor (RMM) defines a set of measurement registers
consisting of a Realm Initial Measurement (RIM) and a number of Realm
Extensible Measurements (REMs). This series introduces the necessary
infrastructure to interact with these registers via the RSI interface
and exposes them to userspace through the TSM measurement framework.

At a high level, the series includes:
 - Helper interfaces for reading and extending measurement
   registers via RSI
 - Definitions for Realm hash algorithms as defined by the 
   RMM specification
 - Integration with the TSM measurement subsystem and sysfs
   exposure for userspace visibility and interaction

After applying this series, measurement registers are exposed under:
    /sys/devices/virtual/misc/arm_cca_guest/measurements/

  Where:
   - rim is read-only (initial measurement)
   - rem[0-3] are read/write (extensible measurements)
   - The hash algorithm reflects the Realm configuration

Patch summary:
 1. arm64: rsi: Add helpers for Arm CCA measurement registers
   - Introduces RSI helper APIs to read and extend RIM/REM registers

 2. arm64: rsi: Add realm hash algorithm defines
   - Adds definitions for SHA-256 and SHA-512 identifiers returned
     by the RMM

 3. virt: arm-cca-guest: Add support for measurement registers
   - Integrates with TSM measurement framework
   - Implements measurement register refresh and extend operations
   - Exposes registers via sysfs using a misc device
   - Dynamically configures hash algorithm and digest size per Realm

This enables a consistent mechanism for attestation-related measurements
in Arm CCA guests and aligns with the kernel TSM measurement abstraction.

Feedback is very welcome.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>

Sami Mujawar (3):
  arm64: rsi: Add helpers for Arm CCA measurement register operations
  arm64: rsi: Add realm hash algorithm defines
  virt: arm-cca-guest: Add support for measurement registers

 .../sysfs-devices-virtual-misc-arm_cca_guest  |  38 +++
 arch/arm64/include/asm/rsi_cmds.h             | 105 ++++++-
 arch/arm64/include/asm/rsi_smc.h              |   7 +
 drivers/virt/coco/arm-cca-guest/Kconfig       |   1 +
 .../virt/coco/arm-cca-guest/arm-cca-guest.c   | 296 +++++++++++++++++-
 5 files changed, 442 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-devices-virtual-misc-arm_cca_guest

-- 
SAMI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}



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

end of thread, other threads:[~2026-04-14 13:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13  8:49 [PATCH 0/3] arm64/virt: Add Arm CCA measurement register support Sami Mujawar
2026-04-13  8:49 ` [PATCH 1/3] arm64: rsi: Add helpers for Arm CCA measurement register operations Sami Mujawar
2026-04-13  8:49 ` [PATCH 2/3] arm64: rsi: Add realm hash algorithm defines Sami Mujawar
2026-04-13  8:49 ` [PATCH 3/3] virt: arm-cca-guest: Add support for measurement registers Sami Mujawar
2026-04-13 12:59 ` [PATCH 0/3] arm64/virt: Add Arm CCA measurement register support Jason Gunthorpe
2026-04-14 10:10   ` Suzuki K Poulose
2026-04-14 12:29     ` Jason Gunthorpe
2026-04-14 13:26       ` Suzuki K Poulose
2026-04-14 13:35         ` Jason Gunthorpe

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