Skip to content
Commit c077711f authored by Suzuki Poulose's avatar Suzuki Poulose Committed by Catalin Marinas
Browse files

arm64: Detect if in a realm and set RIPAS RAM



Detect that the VM is a realm guest by the presence of the RSI
interface. This is done after PSCI has been initialised so that we can
check the SMCCC conduit before making any RSI calls.

If in a realm then iterate over all memory ensuring that it is marked as
RIPAS RAM. The loader is required to do this for us, however if some
memory is missed this will cause the guest to receive a hard to debug
external abort at some random point in the future. So for a
belt-and-braces approach set all memory to RIPAS RAM. Any failure here
implies that the RAM regions passed to Linux are incorrect so panic()
promptly to make the situation clear.

Reviewed-by: default avatarGavin Shan <gshan@redhat.com>
Reviewed-by: Catalin Marinas's avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Co-developed-by: Steven Price's avatarSteven Price <steven.price@arm.com>
Signed-off-by: Steven Price's avatarSteven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20241017131434.40935-3-steven.price@arm.com


Signed-off-by: Catalin Marinas's avatarCatalin Marinas <catalin.marinas@arm.com>
parent b880a800
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment