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