Skip to contentSkip to conversation

[6100] When -icount is used and a TB is recompiled due to an IO access

Qemu-devel Paul Brook 1 participant 1 message Dec 19, 2008

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

Revision: 6100

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6100
Author:   pbrook
Date:     2008-12-19 12:49:13 +0000 (Fri, 19 Dec 2008)

Log Message:
-----------
When -icount is used and a TB is recompiled due to an IO access shortly after an IRQ has been raised, env->exception_index will still be set to EXCP_IRQ when cpu_io_recompile calls cpu_resume_from_signal. This causes qemu to repeat the IRQ trap, with disasterous consequences.

I suspect this "works" most of the time because linux tends to drop back to svc mode before doing actual IRQ processing, and be fairly tolerant of spurious IRQ traps.

Modified Paths:
--------------
trunk/cpu-exec.c

Modified: trunk/cpu-exec.c
===================================================================

cpu-exec.c +1 -0
@@ -86,6 +86,7 @@
 #endif
     }
 #endif
+    env->exception_index = -1;
     longjmp(env->jmp_env, 1);
 }