Skip to contentSkip to conversation

Allow ARMv8 SCR.SMD updates

PATCH Applied Greg Bellows 2 participants 2 messages Apr 24, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow ARMv8 SCR.SMD updates

Updated scr_write to always allow updates to the SCR.SMD bit on ARMv8 regardless of whether virtualization (EL2) is enabled or not.

---
 target-arm/helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
target-arm/helper.c +3 -1
index e7ab5c4..2a8bd87 100644
@@ -844,8 +844,10 @@ static void scr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value)
          * supported if EL2 exists. The bit is UNK/SBZP when
          * EL2 is unavailable. In QEMU ARMv7, we force it to always zero
          * when EL2 is unavailable.
+         * On ARMv8, this bit is always available.
          */
-        if (arm_feature(env, ARM_FEATURE_V7)) {
+        if (arm_feature(env, ARM_FEATURE_V7) &&
+            !arm_feature(env, ARM_FEATURE_V8)) {
             valid_mask &= ~SCR_SMD;
         }
     }
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 5 lines · Greg Bellows

Updated scr_write to always allow updates to the SCR.SMD bit on ARMv8 regardless of whether virtualization (EL2) is enabled or not.

---

Applied to target-arm.next, thanks.

-- PMM