From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JFWUn-0002yG-Ii for qemu-devel@nongnu.org; Thu, 17 Jan 2008 10:17:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JFWUl-0002w7-Sg for qemu-devel@nongnu.org; Thu, 17 Jan 2008 10:17:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFWUl-0002vu-HV for qemu-devel@nongnu.org; Thu, 17 Jan 2008 10:17:31 -0500 Received: from kuber.nabble.com ([216.139.236.158]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JFWUl-0005T6-Af for qemu-devel@nongnu.org; Thu, 17 Jan 2008 10:17:31 -0500 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JFWUj-0007rl-O5 for qemu-devel@nongnu.org; Thu, 17 Jan 2008 07:17:29 -0800 Message-ID: <14921171.post@talk.nabble.com> Date: Thu, 17 Jan 2008 07:17:29 -0800 (PST) From: TeLeMan Subject: [Qemu-devel] [PATCH] i386 hard interrupt generation bug fix MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 in cpu-exe.c: intno=cpu_get_pic_interrupt(env); intno may be -1, we have to skip this error code. http://www.nabble.com/file/p14921171/hard_int.patch hard_int.patch: --- qemu.orig/cpu-exec.c Mon Jan 14 11:11:02 2008 +++ qemu/cpu-exec.c Thu Jan 17 23:03:00 2008 @@ -449,16 +449,18 @@ int cpu_exec(CPUState *env1) (env->eflags & IF_MASK || env->hflags & HF_HIF_MASK) && !(env->hflags & HF_INHIBIT_IRQ_MASK)) { int intno; - svm_check_intercept(SVM_EXIT_INTR); env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ); intno = cpu_get_pic_interrupt(env); - if (loglevel & CPU_LOG_TB_IN_ASM) { - fprintf(logfile, "Servicing hardware INT=0x%02x\n", intno); - } - do_interrupt(intno, 0, 0, 0, 1); - /* ensure that no TB jump will be modified as - the program flow was changed */ - BREAK_CHAIN; + if(intno>=0) { + svm_check_intercept(SVM_EXIT_INTR); + if (loglevel & CPU_LOG_TB_IN_ASM) { + fprintf(logfile, "Servicing hardware INT=0x%02x\n", intno); + } + do_interrupt(intno, 0, 0, 0, 1); + /* ensure that no TB jump will be modified as + the program flow was changed */ + BREAK_CHAIN; + } #if !defined(CONFIG_USER_ONLY) } else if ((interrupt_request & CPU_INTERRUPT_VIRQ) && (env->eflags & IF_MASK) && !(env->hflags & HF_INHIBIT_IRQ_MASK)) { -- View this message in context: http://www.nabble.com/-PATCH--i386-hard-interrupt-generation-bug-fix-tp14921171p14921171.html Sent from the QEMU - Dev mailing list archive at Nabble.com.