From 452a095526a0537f16c271516a2200877a272ea8 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Fri, 2 Jun 2017 11:51:47 +0100 Subject: arm: Clean up handling of no-MPU PMSA CPUs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ARM CPUs come in two flavours: * proper MMU ("VMSA") * only an MPU ("PMSA") For PMSA, the MPU may be implemented, or not (in which case there is default "always acts the same" behaviour, but it isn't guest programmable). QEMU is a bit confused about how we indicate this: we have an ARM_FEATURE_MPU, but it's not clear whether this indicates "PMSA, not VMSA" or "PMSA and MPU present" , and sometimes we use it for one purpose and sometimes the other. Currently trying to implement a PMSA-without-MPU core won't work correctly because we turn off the ARM_FEATURE_MPU bit and then a lot of things which should still exist get turned off too. As the first step in cleaning this up, rename the feature bit to ARM_FEATURE_PMSA, which indicates a PMSA CPU (with or without MPU). Signed-off-by: Peter Maydell Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Message-id: 1493122030-32191-5-git-send-email-peter.maydell@linaro.org --- target/arm/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/arm/machine.c') diff --git a/target/arm/machine.c b/target/arm/machine.c index d8094a840b..ac6b758e3b 100644 --- a/target/arm/machine.c +++ b/target/arm/machine.c @@ -142,7 +142,7 @@ static bool pmsav7_needed(void *opaque) ARMCPU *cpu = opaque; CPUARMState *env = &cpu->env; - return arm_feature(env, ARM_FEATURE_MPU) && + return arm_feature(env, ARM_FEATURE_PMSA) && arm_feature(env, ARM_FEATURE_V7); } -- cgit v1.2.1