From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54354 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfAJN-0008Jh-KC for qemu-devel@nongnu.org; Tue, 18 Jan 2011 07:05:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfAJG-0004Iy-D4 for qemu-devel@nongnu.org; Tue, 18 Jan 2011 07:05:15 -0500 Received: from cantor.suse.de ([195.135.220.2]:37039 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfAJG-0004Ip-82 for qemu-devel@nongnu.org; Tue, 18 Jan 2011 07:05:14 -0500 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <4D35587F.3050503@redhat.com> Date: Tue, 18 Jan 2011 13:05:11 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <2006A7EF-07DC-4DAA-B6ED-88D24D6B7978@suse.de> References: <1292879604-22268-1-git-send-email-agraf@suse.de> <1292879604-22268-9-git-send-email-agraf@suse.de> <4D34542D.7080301@siemens.com> <4D3467B9.3070207@suse.de> <4D346834.8000903@siemens.com> <4D3468A0.3060709@suse.de> <4D346C31.8060300@siemens.com> <4D346F5B.7090502@suse.de> <4D35587F.3050503@redhat.com> Subject: [Qemu-devel] Re: [PATCH 8/8] ahci: fix !msi interrupts List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Kevin Wolf , Jan Kiszka , Sebastian Herbszt , qemu-devel Developers , Joerg Roedel On 18.01.2011, at 10:08, Gerd Hoffmann wrote: > Hi, >=20 >>> Worse might also be that unknown issue that force you to inject an = IRQ >>> here. We don't know. That's probably worst. >>=20 >> Well, IIRC the issue was that usually a level high interrupt line = would >> simply retrigger an interrupt after enabling the interrupt line in = the >> APIC again. >=20 > edge triggered interrupts wouldn't though. The code change doesn't change anything for edge triggered interrupts - = they work fine. Only !msi (=3D=3D level) ones are broken. >=20 >> Unless my memory completely fails on me, that didn't happen, >> so I added the manual retrigger on a partial command ACK in ahci = code. >=20 > That re-trigger smells like you are not clearing the interrupt line = where you should. For starters try calling ahci_check_irq() after guest = writes to PORT_IRQ_STAT. The problem happened when I had the following: ahci irq bits =3D 0 ahci irq bits =3D 1 | 2 irq line trigger guest clears 1 ahci bits =3D 2 On normal hardware, the high state of the irq line would simply trigger = another interrupt in the guest when it gets ACKed on the LAPIC. Somehow = it doesn't get triggered here. I don't see why clearing the interrupt = line would help? It's not what real hardware would do, no? Alex