Message ID | 1463059985-2272-14-git-send-email-peter.maydell@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/target-arm/helper.c b/target-arm/helper.c index 09638b2..59efb90 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -6708,7 +6708,9 @@ static int get_S2prot(CPUARMState *env, int s2ap, int xn) prot |= PAGE_WRITE; } if (!xn) { - prot |= PAGE_EXEC; + if (arm_el_is_aa64(env, 2) || prot & PAGE_READ) { + prot |= PAGE_EXEC; + } } return prot; }