Re: [PATCH v11 3/7] firmware: arm_rmm: Move RSI support out of arch/arm64

From: Catalin Marinas

Date: Wed Sep 16 2026 - 07:34:04 EST


On Mon, Sep 14, 2026 at 11:35:07AM +0530, Aneesh Kumar K.V (Arm) wrote:
> The RSI SMCCC function IDs describe a firmware ABI and are not arm64
> architecture specific definitions. Follow-up changes need to use them from
> non-arch code, including drivers/firmware/smccc and the Arm CCA guest
> driver.
>
> Move the complete Realm Service Interface (RSI) implementation from
> arch/arm64 to drivers/firmware/arm_rmm. The RSI SMCCC definitions and
> command helpers are also moved to include/linux so they can be shared by
> architecture code and firmware or driver code. This also keeps the
> firmware interface outside architecture code, as requested [1].
>
> [1] https://lore.kernel.org/all/agsNO9cc7H-b0H8L@willie-the-truck
>
> Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Acked-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
> Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar@xxxxxxxxxx>
> ---
> arch/arm64/Kconfig | 1 +
> arch/arm64/include/asm/io.h | 2 +-
> arch/arm64/include/asm/mem_encrypt.h | 2 +-
> arch/arm64/include/asm/pgtable-prot.h | 2 +-
> arch/arm64/include/asm/rsi.h | 70 -----------------
> arch/arm64/kernel/Makefile | 2 +-
> arch/arm64/kernel/setup.c | 2 +-
> arch/arm64/mm/init.c | 3 +-
> drivers/firmware/Kconfig | 1 +
> drivers/firmware/Makefile | 1 +
> drivers/firmware/arm_rmm/Kconfig | 17 ++++
> drivers/firmware/arm_rmm/Makefile | 2 +
> .../kernel => drivers/firmware/arm_rmm}/rsi.c | 2 +-
> drivers/virt/coco/arm-cca-guest/Kconfig | 2 +-
> .../virt/coco/arm-cca-guest/arm-cca-guest.c | 5 +-
> .../linux/arm-rsi-cmds.h | 77 +++++++++++++++++--
> .../linux/arm-smccc-rsi.h | 6 +-
> 17 files changed, 108 insertions(+), 89 deletions(-)
> delete mode 100644 arch/arm64/include/asm/rsi.h
> create mode 100644 drivers/firmware/arm_rmm/Kconfig
> create mode 100644 drivers/firmware/arm_rmm/Makefile
> rename {arch/arm64/kernel => drivers/firmware/arm_rmm}/rsi.c (99%)
> rename arch/arm64/include/asm/rsi_cmds.h => include/linux/arm-rsi-cmds.h (69%)
> rename arch/arm64/include/asm/rsi_smc.h => include/linux/arm-smccc-rsi.h (98%)

BTW, can you also add the new files under the ARM64 PORT in MAINTAINERS,
similar to arm-cca-guest?

Thanks.

--
Catalin