qemu-patch-raspberry4/target
Victor Kamensky a75a52d624 arm/translate-a64: treat DISAS_UPDATE as variant of DISAS_EXIT
In OE project 4.15 linux kernel boot hang was observed under
single cpu aarch64 qemu. Kernel code was in a loop waiting for
vtimer arrival, spinning in TC generated blocks, while interrupt
was pending unprocessed. This happened because when qemu tried to
handle vtimer interrupt target had interrupts disabled, as
result flag indicating TCG exit, cpu->icount_decr.u16.high,
was cleared but arm_cpu_exec_interrupt function did not call
arm_cpu_do_interrupt to process interrupt. Later when target
reenabled interrupts, it happened without exit into main loop, so
following code that waited for result of interrupt execution
run in infinite loop.

To solve the problem instructions that operate on CPU sys state
(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
should be considered as DISAS_EXIT variant, and should be
forced to exit back to main loop so qemu will have a chance
processing pending CPU state updates, including pending
interrupts.

This change brings consistency with how DISAS_UPDATE is treated
in aarch32 case.

CC: Peter Maydell <peter.maydell@linaro.org>
CC: Alex Bennée <alex.bennee@linaro.org>
CC: qemu-stable@nongnu.org
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-03-23 18:26:45 +00:00
..
alpha cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
arm arm/translate-a64: treat DISAS_UPDATE as variant of DISAS_EXIT 2018-03-23 18:26:45 +00:00
cris cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
hppa cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
i386 HMP fixes for 2.12 2018-03-20 18:03:10 +00:00
lm32 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
m68k -----BEGIN PGP SIGNATURE----- 2018-03-20 14:19:23 +00:00
microblaze cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
mips cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
moxie cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
nios2 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
openrisc cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
ppc cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
riscv Machine and x86 queue, 2018-03-19 2018-03-20 12:56:20 +00:00
s390x s390x/cpumodel: fix feature groups and breakage of MSA8 2018-03-23 09:05:42 +00:00
sh4 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
sparc cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
tilegx cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
tricore cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
unicore32 cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00
xtensa cpu: get rid of unused cpu_init() defines 2018-03-19 14:10:36 -03:00