]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arm64: rsi: Add support for checking whether an MMIO is protected
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 17 Oct 2024 13:14:27 +0000 (14:14 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 23 Oct 2024 09:19:32 +0000 (10:19 +0100)
commit371589437616fbb03590d8ff505f8a4c95c8a031
tree38a3175d507392760e11ac40e22f13bd69f421aa
parent399306954996be58ac20b4b29f6334e3d55a2ce7
arm64: rsi: Add support for checking whether an MMIO is protected

On Arm CCA, with RMM-v1.0, all MMIO regions are shared. However, in
the future, an Arm CCA-v1.0 compliant guest may be run in a lesser
privileged partition in the Realm World (with Arm CCA-v1.1 Planes
feature). In this case, some of the MMIO regions may be emulated
by a higher privileged component in the Realm world, i.e, protected.

Thus the guest must decide today, whether a given MMIO region is shared
vs Protected and create the stage1 mapping accordingly. On Arm CCA, this
detection is based on the "IPA State" (RIPAS == RIPAS_IO). Provide a
helper to run this check on a given range of MMIO.

Also, provide a arm64 helper which may be hooked in by other solutions.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20241017131434.40935-5-steven.price@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/io.h
arch/arm64/include/asm/rsi.h
arch/arm64/include/asm/rsi_cmds.h
arch/arm64/kernel/rsi.c