summaryrefslogtreecommitdiff
path: root/target-arm/translate-a64.c
diff options
context:
space:
mode:
authorSergey Sorokin <afarallax@yandex.ru>2015-09-08 17:38:44 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-09-08 17:38:44 +0100
commitcef9ee706792b1e205fe472b67053a0e82cd058e (patch)
treebd1954051c8ac0fd27e13d133a5fc0e1b11f3171 /target-arm/translate-a64.c
parent0e21f183ca2d000bbda1fb63959a3d41a1c3ff42 (diff)
downloadqemu-cef9ee706792b1e205fe472b67053a0e82cd058e.tar.gz
target-arm: Fix default_exception_el() function for the case when EL3 is not supported
If EL3 is not supported in current configuration, we should not try to get EL3 bitness. Signed-off-by: Sergey Sorokin <afarallax@yandex.ru> Message-id: 1441208342-10601-2-git-send-email-afarallax@yandex.ru Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/translate-a64.c')
-rw-r--r--target-arm/translate-a64.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
index 529bb0c41d..faece2cd43 100644
--- a/target-arm/translate-a64.c
+++ b/target-arm/translate-a64.c
@@ -10966,7 +10966,11 @@ void gen_intermediate_code_internal_a64(ARMCPU *cpu,
dc->condjmp = 0;
dc->aarch64 = 1;
- dc->el3_is_aa64 = arm_el_is_aa64(env, 3);
+ /* If we are coming from secure EL0 in a system with a 32-bit EL3, then
+ * there is no secure EL1, so we route exceptions to EL3.
+ */
+ dc->secure_routed_to_el3 = arm_feature(env, ARM_FEATURE_EL3) &&
+ !arm_el_is_aa64(env, 3);
dc->thumb = 0;
dc->bswap_code = 0;
dc->condexec_mask = 0;