]> git.proxmox.com Git - mirror_qemu.git/commit - target/arm/translate.c
target/arm: use DISAS_EXIT for eret handling
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 17 Jul 2017 12:36:07 +0000 (13:36 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 17 Jul 2017 12:36:07 +0000 (13:36 +0100)
commitb29fd33db578decacd14f34933b29aece3e7c25e
tree3bc9b84964ab6c36ea0ee0313a472eaf217f4778
parent0b609cc128ba5ef16cc841bcade898d1898f1dc3
target/arm: use DISAS_EXIT for eret handling

Previously DISAS_JUMP did ensure this but with the optimisation of
8a6b28c7 (optimize indirect branches) we might not leave the loop.
This means if any pending interrupts are cleared by changing IRQ flags
we might never get around to servicing them. You usually notice this
by seeing the lookup_tb_ptr() helper gainfully chaining TBs together
while cpu->interrupt_request remains high and the exit_request has not
been set.

This breaks amongst other things the OPTEE test suite which executes
an eret from the secure world after a non-secure world IRQ has gone
pending which then never gets serviced.

Instead of using the previously implied semantics of DISAS_JUMP we use
DISAS_EXIT which will always exit the run-loop.

CC: Etienne Carriere <etienne.carriere@linaro.org>
CC: Joakim Bech <joakim.bech@linaro.org>
CC: Jaroslaw Pelczar <j.pelczar@samsung.com>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: Emilio G. Cota <cota@braap.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-id: 20170713141928.25419-7-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/translate-a64.c
target/arm/translate.c