]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
target-arm: A64: Trap ERET from EL0 at translation time
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Tue, 27 May 2014 16:09:54 +0000 (17:09 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 27 May 2014 16:09:54 +0000 (17:09 +0100)
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1400980132-25949-19-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/translate-a64.c

index bfd139afe54cbad3fbae487d876bb38ec49bd2c3..ec6a39d1d60ed3fc9c6e52e2d5e479707719ac85 100644 (file)
@@ -1507,6 +1507,10 @@ static void disas_uncond_b_reg(DisasContext *s, uint32_t insn)
         tcg_gen_movi_i64(cpu_reg(s, 30), s->pc);
         break;
     case 4: /* ERET */
+        if (s->current_pl == 0) {
+            unallocated_encoding(s);
+            return;
+        }
         gen_helper_exception_return(cpu_env);
         s->is_jmp = DISAS_JUMP;
         return;