diff mbox

Allow ARMv8 SCR.SMD updates

Message ID 1429888797-4378-1-git-send-email-greg.bellows@linaro.org
State Superseded
Headers show

Commit Message

Greg Bellows April 24, 2015, 3:19 p.m. UTC
Updated scr_write to always allow updates to the SCR.SMD bit on ARMv8
regardless of whether virtualization (EL2) is enabled or not.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
---
 target-arm/helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Peter Maydell April 24, 2015, 5:09 p.m. UTC | #1
On 24 April 2015 at 16:19, Greg Bellows <greg.bellows@linaro.org> wrote:
> Updated scr_write to always allow updates to the SCR.SMD bit on ARMv8
> regardless of whether virtualization (EL2) is enabled or not.
>
> Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
> ---



Applied to target-arm.next, thanks.

-- PMM
diff mbox

Patch

diff --git a/target-arm/helper.c b/target-arm/helper.c
index e7ab5c4..2a8bd87 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -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;
         }
     }