When emulator works with HAX accelerator, all hardirq events should
be processed by HAX, not in cpu_exec loop. It is exactly how it works
most of the time even without this fix, but in some cases, for example,
if we're using YaGL openGL passthrough device, interrupt could be
handled incide cpu_exec loop, which will cause errors in emulation.
Use explicit check for HAX enabled to decide if we want to handle
interrupts. Note that it doesn't change behaviour for usual emulator
workflow because usually interrupt_request is always 0 at this point.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
next_tb = 0; /* force lookup of first TB */
for(;;) {
- interrupt_request = env->interrupt_request;
+ interrupt_request = need_handle_intr_request(env);
if (unlikely(interrupt_request)) {
if (unlikely(env->singlestep_enabled & SSTEP_NOIRQ)) {
/* Mask out external interrupts for this step. */