qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] target/arm: Enable FEAT_MOPS insns in user-mode emulation


From: Peter Maydell
Subject: [PATCH 1/3] target/arm: Enable FEAT_MOPS insns in user-mode emulation
Date: Mon, 30 Oct 2023 17:39:58 +0000

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>
---
 target/arm/cpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index aa4e006f21a..cdb37ce5512 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -295,6 +295,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)) {
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]