qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 5/5] target/arm: use DISAS_EXIT for eret hand


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 5/5] target/arm: use DISAS_EXIT for eret handling
Date: Mon, 10 Jul 2017 09:58:31 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 07/10/2017 09:21 AM, Alex Bennée wrote:
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.

Signed-off-by: Alex Bennée<address@hidden>
CC: Etienne Carriere<address@hidden>
CC: Joakim Bech<address@hidden>
CC: Peter Maydell<address@hidden>
CC: Emilio G. Cota<address@hidden>
CC: Richard Henderson<address@hidden>
---
  target/arm/translate-a64.c | 3 ++-
  target/arm/translate.c     | 6 ++++--
  2 files changed, 6 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <address@hidden>

As an aside, I presume we don't have support for armv7ve? I was expecting there to be an eret insn in the aa32 translator and had to dig up previous manuals to see when that insn was introduced.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]