From: Jan Kiszka <[email protected]> This avoids taking over the SMMU when Linux is already using it due to a configuration mistake.
Signed-off-by: Jan Kiszka <[email protected]> --- Should probably be done for SMMUv3 and PVU as well. hypervisor/arch/arm64/smmu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hypervisor/arch/arm64/smmu.c b/hypervisor/arch/arm64/smmu.c index 41c0ffb4..89631d16 100644 --- a/hypervisor/arch/arm64/smmu.c +++ b/hypervisor/arch/arm64/smmu.c @@ -311,6 +311,10 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu) if (ID7_MAJOR(mmio_read32(gr0_base + ARM_SMMU_GR0_ID7)) != 2) return trace_error(-EIO); + /* Make sure the SMMU is not in use */ + if (!(mmio_read32(gr0_base + ARM_SMMU_GR0_sCR0) & sCR0_CLIENTPD)) + return trace_error(-EBUSY); + /* ID0 */ id = mmio_read32(gr0_base + ARM_SMMU_GR0_ID0); -- 2.26.2 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/c33525fd-2b01-a4dc-451b-f4f126449ac9%40siemens.com.
