diff mbox series

[PULL,23/33] target/arm: Enable FEAT_MOPS insns in user-mode emulation

Message ID 20231102173835.609985-24-peter.maydell@linaro.org
State Accepted
Commit a6b2c5a04ddae291417d5bfffaa25b13a7d8cd10
Headers show
Series [PULL,01/33] linux-user/elfload: Add missing arm64 hwcap values | expand

Commit Message

Peter Maydell Nov. 2, 2023, 5:38 p.m. UTC
In user-mode emulation, we need to set the SCTLR_EL1.MSCEn
bit to avoid all the FEAT_MOPS insns UNDEFing.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20231030174000.3792225-2-peter.maydell@linaro.org
---
 target/arm/cpu.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 954328d72a0..df6496b0193 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -296,6 +296,8 @@  static void arm_cpu_reset_hold(Object *obj)
         env->cp15.sctlr_el[1] |= SCTLR_TSCXT;
         /* Disable access to Debug Communication Channel (DCC). */
         env->cp15.mdscr_el1 |= 1 << 12;
+        /* Enable FEAT_MOPS */
+        env->cp15.sctlr_el[1] |= SCTLR_MSCEN;
 #else
         /* Reset into the highest available EL */
         if (arm_feature(env, ARM_FEATURE_EL3)) {