From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KW0e5-0007SW-L4 for qemu-devel@nongnu.org; Wed, 20 Aug 2008 23:15:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KW0e5-0007Ry-1S for qemu-devel@nongnu.org; Wed, 20 Aug 2008 23:15:33 -0400 Received: from [199.232.76.173] (port=37199 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KW0e4-0007Rq-Lp for qemu-devel@nongnu.org; Wed, 20 Aug 2008 23:15:32 -0400 Received: from hall.aurel32.net ([91.121.138.14]:57033) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KW0e4-0004OC-60 for qemu-devel@nongnu.org; Wed, 20 Aug 2008 23:15:32 -0400 Received: from [88.128.94.200] (helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KW0dz-0007dH-N1 for qemu-devel@nongnu.org; Thu, 21 Aug 2008 05:15:27 +0200 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1KW0dt-0003dP-3V for qemu-devel@nongnu.org; Thu, 21 Aug 2008 05:15:21 +0200 Date: Thu, 21 Aug 2008 05:15:21 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 1/2] De-assert ISA PIC IRQs properly Message-ID: <20080821031521.GH3371@volta.aurel32.net> References: <48A998AB.5080409@web.de> <48AC3535.2080506@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <48AC3535.2080506@siemens.com> 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 On Wed, Aug 20, 2008 at 05:16:05PM +0200, Jan Kiszka wrote: > [ Taking latest isapc changes into account. ] Applied, thanks. > In case the PIC IRQ gets de-asserted on an isapc machine, we also have > to reset CPU_INTERRUPT_HARD. This is what older qemu (before the > routing-through-APIC changes) used to do as well. > > Signed-off-by: Jan Kiszka > --- > hw/pc.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > Index: b/hw/pc.c > =================================================================== > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -118,17 +118,19 @@ static void pic_irq_request(void *opaque > { > CPUState *env = first_cpu; > > - if (!level) > - return; > - > if (env->apic_state) { > + if (!level) > + return; > while (env) { > if (apic_accept_pic_intr(env)) > apic_local_deliver(env, APIC_LINT0); > env = env->next_cpu; > } > } else { > - cpu_interrupt(env, CPU_INTERRUPT_HARD); > + if (level) > + cpu_interrupt(env, CPU_INTERRUPT_HARD); > + else > + cpu_reset_interrupt(env, CPU_INTERRUPT_HARD); > } > } > > > > -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net