[PATCH 0/6] firmware: arm_rmm: Add RMM v2.0 support
Steven Price <[email protected]>
| Newsgroups | dev.linux.lists.linux-coco,dev.linux.lists.kvmarm,org.infradead.lists.linux-arm-kernel,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
This series adds the generic firmware layer for talking to the Realm Management Monitor (RMM), as specified by the RMM v2.0-bet2 specification[1]. It is the first part of the Arm CCA host support that was previously posted as part of the larger KVM series. The split allows this RMM support to be used as a base for other work, including Aneesh's changes, without depending on the KVM Realm support that follows in the second series. The series adds: * The RMI SMC definitions and direct-call wrappers. * RMM discovery and version checks during firmware init. * RMM host configuration, including the host page size. * Stateful RMI Operation (SRO) infrastructure for commands which the RMM can complete across multiple SMC calls while requesting or returning memory to the host. * GPT setup so that the RMM has entries for host memory. The RMM v2.0 spec introduces Stateful RMI Operations (SROs), which allow the RMM to complete an operation over several SMC calls while requesting or returning memory to the host. This allows interrupts to be handled in the middle of an operation and lets the RMM dynamically allocate memory for internal tracking purposes. For example, RMI_REC_CREATE no longer needs auxiliary granules to be provided up front, and can instead request memory during the operation. This series is based on v7.2-rc1 and Ackerley's guest_memfd in-place series[2]. It is also available as a git repository along with the KVM host support: https://gitlab.arm.com/linux-arm/linux-cca cca-host/v15 The TF-RMM has now merged most of the RMM v2.0 support needed by this series. The remaining PSCI changes have not yet merged; for testing those changes are available in the following TF-RMM branch: https://git.trustedfirmware.org/TF-RMM/tf-rmm.git topics/rmm-v2.0-poc_3 [1] https://developer.arm.com/documentation/den0137/2-0bet2/ Note that one bet2 change, which moves metadata out of the individual address range descriptors, has intentionally not been implemented because that part of the spec is expected to be reverted. [2] https://lore.kernel.org/r/[email protected] with Suzuki's fix on top: https://lore.kernel.org/all/[email protected]/ Steven Price (6): firmware: arm_rmm: Add SMC definitions for calling the RMM firmware: arm_rmm: Add wrappers for direct RMI calls firmware: arm_rmm: Check for RMI support at init firmware: arm_rmm: Configure the RMM with the host's page size firmware: arm_rmm: Add support for SRO firmware: arm_rmm: Ensure the RMM has GPT entries for memory arch/arm64/Kconfig | 1 + arch/arm64/include/asm/rmi_cmds.h | 459 +++++++++++++++++++ arch/arm64/kernel/cpufeature.c | 1 + drivers/firmware/Kconfig | 1 + drivers/firmware/Makefile | 1 + drivers/firmware/arm_rmm/Kconfig | 22 + drivers/firmware/arm_rmm/Makefile | 2 + drivers/firmware/arm_rmm/rmi.c | 724 ++++++++++++++++++++++++++++++ include/linux/arm-rmi-cmds.h | 205 +++++++++ include/linux/arm-smccc-rmi.h | 499 ++++++++++++++++++++ 10 files changed, 1915 insertions(+) create mode 100644 arch/arm64/include/asm/rmi_cmds.h create mode 100644 drivers/firmware/arm_rmm/Kconfig create mode 100644 drivers/firmware/arm_rmm/Makefile create mode 100644 drivers/firmware/arm_rmm/rmi.c create mode 100644 include/linux/arm-rmi-cmds.h create mode 100644 include/linux/arm-smccc-rmi.h -- 2.43.0