From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQZX4-0006bG-UC for qemu-devel@nongnu.org; Mon, 30 Sep 2013 05:12:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQZWy-0003Qv-Vn for qemu-devel@nongnu.org; Mon, 30 Sep 2013 05:12:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQZWy-0003Qq-Ni for qemu-devel@nongnu.org; Mon, 30 Sep 2013 05:12:40 -0400 Date: Mon, 30 Sep 2013 12:14:57 +0300 From: "Michael S. Tsirkin" Message-ID: <20130930091457.GD20291@redhat.com> References: <1380465657-22600-1-git-send-email-marcel.a@redhat.com> <20130929150613.GA19383@redhat.com> <1380528896.3439.2.camel@localhost.localdomain> <20130930085815.GA20291@redhat.com> <52493E0E.1060308@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52493E0E.1060308@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/3] hw: set irq without selecting INTx pin List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.crosthwaite@xilinx.com, stefanha@redhat.com, Marcel Apfelbaum , sw@weilnetz.de, jasowang@redhat.com, "qemu-devel@nongnu.org" , dkoch@verizon.com, alex.williamson@redhat.com, paul@codesourcery.com, anthony@codemonkey.ws, afaerber@suse.de, kraxel@redhat.com On Mon, Sep 30, 2013 at 11:02:06AM +0200, Paolo Bonzini wrote: > Il 30/09/2013 10:58, Michael S. Tsirkin ha scritto: > >>> > > As a next step, can we make pci_set_irq non-inline and make > >>> > > it call pci_irq_handler directly, and get rid of the irq field? > >> > What irq field? > > /* IRQ objects for the INTA-INTD pins. */ > > qemu_irq *irq; > > > > That's still used by devices that use common code for PCI and sysbus > versions (e.g. USB OHCI and EHCI). > > Paolo Well this work wouldn't be complete without addressing them anyway. These devices would have to create their own irq in pci-specific code, along the lines of: - s->irq = dev->irq[3]; + s->irq = qemu_allocate_irqs(pci_set_irq, dev, 1); If there's more than one device like this, we should add /* Return an irq that calls pci_set_irq internally */ qemu_irq *pci_allocate_irq(PCIDevice *); -- MST