From: Igor Mitsyanko Date: Wed, 5 Dec 2012 19:03:55 +0000 (+0400) Subject: cpu-exec: do not handle interrupts if HAX is working X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1256 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbcf0b82fb593447ecd6bed8f12473d498f7716c;p=sdk%2Femulator%2Fqemu.git cpu-exec: do not handle interrupts if HAX is working 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 --- diff --git a/cpu-exec.c b/cpu-exec.c index 0a0858279d..9500e91c04 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -288,7 +288,7 @@ int cpu_exec(CPUArchState *env) 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. */