From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbVv8-0005xl-Ka for qemu-devel@nongnu.org; Wed, 30 Oct 2013 09:34:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbVv2-00045N-IA for qemu-devel@nongnu.org; Wed, 30 Oct 2013 09:34:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbVv2-00045G-9k for qemu-devel@nongnu.org; Wed, 30 Oct 2013 09:34:44 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9UDYhN4025190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 30 Oct 2013 09:34:43 -0400 Date: Wed, 30 Oct 2013 14:34:41 +0100 From: Kevin Wolf Message-ID: <20131030133441.GO2807@dhcp-200-207.str.redhat.com> References: <1382978620-16641-1-git-send-email-pbonzini@redhat.com> <1382978620-16641-11-git-send-email-pbonzini@redhat.com> <20131030124746.GL2807@dhcp-200-207.str.redhat.com> <527106A1.3090904@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <527106A1.3090904@redhat.com> Subject: Re: [Qemu-devel] [PATCH 10/24] ide: add trigger_irq callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, mst@redhat.com Am 30.10.2013 um 14:16 hat Paolo Bonzini geschrieben: > Il 30/10/2013 13:47, Kevin Wolf ha scritto: > > This whole add_status(BM_STATUS_INT) is weird and doesn't seem to make > > sense. For AHCI it triggers the actual IRQ, whereas for BMIDE it only > > sets the status register bit and requires a separate call to trigger the > > IRQ. This function is ide_set_irq(), which in turn ends up completely > > ignored by AHCI (ahci_irq_set() is an empty function). > > The problem is that the IRQ ack is done differently in AHCI (using the > write-1-clears register PORT_IRQ_STAT; PORT_IRQ_MASK can also modify the > status of the interrupt line) and PATA (reading 0x1f7). I don't understand how this is related; I'm really talking about internal interfaces here. ide_set_irq() and .trigger_irq() are really two different ways for the IDE core to communicate that an IRQ should be triggered. They can in theory be used for the same things, but are used inconsistently. > So perhaps the legacy PIO code of hw/ide/core.c should be abstracted > out, including the new restart support. (BTW, to test this with AHCI I > rigged up a modified version of AHCI that has the legacy ports, so that > I could run the new qtest on it). This could be a good idea anyway. Kevin