Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kl6oi-0008Dw-V6 for qemu-devel@nongnu.org; Wed, 01 Oct 2008 14:52:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kl6oi-0008D4-2o for qemu-devel@nongnu.org; Wed, 01 Oct 2008 14:52:56 -0400 Received: from [199.232.76.173] (port=56847 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl6oh-0008Ct-SC for qemu-devel@nongnu.org; Wed, 01 Oct 2008 14:52:55 -0400 Received: from gwyn.kn-bremen.de ([212.63.36.242]:37330) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kl6oh-0007Ju-Jd for qemu-devel@nongnu.org; Wed, 01 Oct 2008 14:52:55 -0400 Received: from saturn.kn-bremen.de (noident@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.14.2/8.13.8) with ESMTP id m91Icd3K070679 for ; Wed, 1 Oct 2008 20:38:39 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.14.2/8.13.6/Submit) id m91Icd9W070678 for qemu-devel@nongnu.org; Wed, 1 Oct 2008 20:38:39 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Wed, 1 Oct 2008 20:38:39 +0200 Message-ID: <20081001183838.GA70670@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] 3/5: Bugfix needed for FreeBSD/amd64 guests 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 This was originally posted as: http://www.nabble.com/-PATCH--i386-hard-interrupt-generation-bug-fix-p14921171.html Index: qemu/cpu-exec.c @@ -394,16 +394,18 @@ (env->eflags & IF_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); + 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 */ + next_tb = 0; } - do_interrupt(intno, 0, 0, 0, 1); - /* ensure that no TB jump will be modified as - the program flow was changed */ - next_tb = 0; #if !defined(CONFIG_USER_ONLY) } else if ((interrupt_request & CPU_INTERRUPT_VIRQ) && (env->eflags & IF_MASK) && Signed-off-by: Juergen Lock