aboutsummaryrefslogtreecommitdiff
path: root/target/arm
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-02-27 12:58:29 -1000
committerPeter Maydell <peter.maydell@linaro.org>2023-03-06 14:08:12 +0000
commit9094f9551df849f68d40236092d8af3ed869d093 (patch)
tree337db6f5f56cb57661005676e43dc35d7d9c4714 /target/arm
parent7d8b28b8b5d9d1b68d27b4f5a0329d114b5ce2ee (diff)
target/arm: Handle m-profile in arm_is_secure
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1421 Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20230227225832.816605-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm')
-rw-r--r--target/arm/cpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index c4bd22808c..ab18701277 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;
}