summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
new file mode 100644
index 0000000000..f90cae694c
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
@@ -0,0 +1,67 @@
1From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
2From: Victor Kamensky <kamensky@cisco.com>
3Date: Fri, 23 Mar 2018 18:26:45 +0000
4Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
5 DISAS_EXIT
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10In OE project 4.15 linux kernel boot hang was observed under
11single cpu aarch64 qemu. Kernel code was in a loop waiting for
12vtimer arrival, spinning in TC generated blocks, while interrupt
13was pending unprocessed. This happened because when qemu tried to
14handle vtimer interrupt target had interrupts disabled, as
15result flag indicating TCG exit, cpu->icount_decr.u16.high,
16was cleared but arm_cpu_exec_interrupt function did not call
17arm_cpu_do_interrupt to process interrupt. Later when target
18reenabled interrupts, it happened without exit into main loop, so
19following code that waited for result of interrupt execution
20run in infinite loop.
21
22To solve the problem instructions that operate on CPU sys state
23(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
24should be considered as DISAS_EXIT variant, and should be
25forced to exit back to main loop so qemu will have a chance
26processing pending CPU state updates, including pending
27interrupts.
28
29This change brings consistency with how DISAS_UPDATE is treated
30in aarch32 case.
31
32CC: Peter Maydell <peter.maydell@linaro.org>
33CC: Alex Bennée <alex.bennee@linaro.org>
34CC: qemu-stable@nongnu.org
35Suggested-by: Peter Maydell <peter.maydell@linaro.org>
36Signed-off-by: Victor Kamensky <kamensky@cisco.com>
37Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
38Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
39Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
40Upstream-Status: Backport
41---
42 target/arm/translate-a64.c | 6 +++---
43 1 file changed, 3 insertions(+), 3 deletions(-)
44
45diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
46index 31ff047..327513e 100644
47--- a/target/arm/translate-a64.c
48+++ b/target/arm/translate-a64.c
49@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
50 case DISAS_UPDATE:
51 gen_a64_set_pc_im(dc->pc);
52 /* fall through */
53- case DISAS_JUMP:
54- tcg_gen_lookup_and_goto_ptr();
55- break;
56 case DISAS_EXIT:
57 tcg_gen_exit_tb(0);
58 break;
59+ case DISAS_JUMP:
60+ tcg_gen_lookup_and_goto_ptr();
61+ break;
62 case DISAS_NORETURN:
63 case DISAS_SWI:
64 break;
65--
662.7.4
67