From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDen7-0006ei-IM for qemu-devel@nongnu.org; Fri, 19 Dec 2008 07:49:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDen4-0006eN-S3 for qemu-devel@nongnu.org; Fri, 19 Dec 2008 07:49:15 -0500 Received: from [199.232.76.173] (port=43887 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDen4-0006eK-Me for qemu-devel@nongnu.org; Fri, 19 Dec 2008 07:49:14 -0500 Received: from savannah.gnu.org ([199.232.41.3]:36757 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LDen4-0003zT-8l for qemu-devel@nongnu.org; Fri, 19 Dec 2008 07:49:14 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LDen3-0000aP-Ox for qemu-devel@nongnu.org; Fri, 19 Dec 2008 12:49:13 +0000 Received: from pbrook by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LDen3-0000aL-Hf for qemu-devel@nongnu.org; Fri, 19 Dec 2008 12:49:13 +0000 MIME-Version: 1.0 Errors-To: pbrook Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Paul Brook Message-Id: Date: Fri, 19 Dec 2008 12:49:13 +0000 Subject: [Qemu-devel] [6100] When -icount is used and a TB is recompiled due to an IO access Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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. Signed-off-by: Paul Brook Modified Paths: -------------- trunk/cpu-exec.c Modified: trunk/cpu-exec.c =================================================================== --- trunk/cpu-exec.c 2008-12-19 12:39:00 UTC (rev 6099) +++ trunk/cpu-exec.c 2008-12-19 12:49:13 UTC (rev 6100) @@ -86,6 +86,7 @@ #endif } #endif + env->exception_index = -1; longjmp(env->jmp_env, 1); }