]> Git Repo - qemu.git/commitdiff
arm: Don't clear ARM_FEATURE_PMSA for no-mpu configs
authorPeter Maydell <[email protected]>
Fri, 2 Jun 2017 10:51:47 +0000 (11:51 +0100)
committerPeter Maydell <[email protected]>
Fri, 2 Jun 2017 10:51:47 +0000 (11:51 +0100)
Fix the handling of QOM properties for PMSA CPUs with no MPU:

Allow no-MPU to be specified by either:
 * has-mpu = false
 * pmsav7_dregion = 0
and make setting one imply the other. Don't clear the PMSA
feature bit in this situation.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 1493122030[email protected]

target/arm/cpu.c

index f844af567342f1266181af5aa08431529cf5a96f..76a5e2011150137084c068177224e4fd915bee96 100644 (file)
@@ -763,8 +763,14 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
         cpu->id_pfr1 &= ~0xf000;
     }
 
+    /* MPU can be configured out of a PMSA CPU either by setting has-mpu
+     * to false or by setting pmsav7-dregion to 0.
+     */
     if (!cpu->has_mpu) {
-        unset_feature(env, ARM_FEATURE_PMSA);
+        cpu->pmsav7_dregion = 0;
+    }
+    if (cpu->pmsav7_dregion == 0) {
+        cpu->has_mpu = false;
     }
 
     if (arm_feature(env, ARM_FEATURE_PMSA) &&
This page took 0.029064 seconds and 4 git commands to generate.