summaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-19 12:49:13 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-19 12:49:13 +0000
commit9a3ea654026c774364557eed172be30d735fe34f (patch)
treee5c5eb9d0f177aa0f7616d9a310e0f64e7b1522e /cpu-exec.c
parentd4934d18f36dbd974e28c700a55e9393395a18c4 (diff)
downloadqemu-9a3ea654026c774364557eed172be30d735fe34f.tar.gz
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. Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6100 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index ed1545b5e1..0a49a7e369 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -86,6 +86,7 @@ void cpu_resume_from_signal(CPUState *env1, void *puc)
#endif
}
#endif
+ env->exception_index = -1;
longjmp(env->jmp_env, 1);
}