From: Richard Henderson Date: Mon, 27 Feb 2023 22:58:29 +0000 (-1000) Subject: target/arm: Handle m-profile in arm_is_secure X-Git-Tag: v8.0.0-rc0~23^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9094f9551df849f68d40236092d8af3ed869d093;p=thirdparty%2Fqemu.git target/arm: Handle m-profile in arm_is_secure Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1421 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20230227225832.816605-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c4bd22808ce..ab187012770 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2421,6 +2421,9 @@ static inline bool arm_is_el3_or_mon(CPUARMState *env) /* Return true if the processor is in secure state */ static inline bool arm_is_secure(CPUARMState *env) { + if (arm_feature(env, ARM_FEATURE_M)) { + return env->v7m.secure; + } if (arm_is_el3_or_mon(env)) { return true; }