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>
This commit is contained in:
Richard Henderson 2023-02-27 12:58:29 -10:00 committed by Peter Maydell
parent 7d8b28b8b5
commit 9094f9551d
1 changed files with 3 additions and 0 deletions

View File

@ -2421,6 +2421,9 @@ static inline bool arm_is_el3_or_mon(CPUARMState *env)
/* Return true if the processor is in secure state */ /* Return true if the processor is in secure state */
static inline bool arm_is_secure(CPUARMState *env) 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)) { if (arm_is_el3_or_mon(env)) {
return true; return true;
} }