Received: from eggs.gnu.org ([2001:4830:134:3::10]:57451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpApE-00083d-1j for qemu-devel@nongnu.org; Thu, 22 Oct 2015 04:02:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpAp8-00040K-F8 for qemu-devel@nongnu.org; Thu, 22 Oct 2015 04:02:15 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:24138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpAp8-0003yf-9G for qemu-devel@nongnu.org; Thu, 22 Oct 2015 04:02:10 -0400 From: Knut Omang Date: Thu, 22 Oct 2015 10:01:32 +0200 Message-Id: <1445500895-27165-2-git-send-email-knut.omang@oracle.com> In-Reply-To: <1445500895-27165-1-git-send-email-knut.omang@oracle.com> References: <1445500895-27165-1-git-send-email-knut.omang@oracle.com> Subject: [Qemu-devel] [PATCH v6 1/4] pci: Make use of the devfn property when registering new devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost , "Michael S. Tsirkin" , Knut Omang , "Richard W.M. Jones" , Alex Williamson , "Gonglei (Arei)" , Jan Kiszka , Dotan Barak , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson Without this, the devfn argument to pci_create_*() does not affect the assigned devfn. Needed to support (VF_STRIDE,VF_OFFSET) values other than (1,1) for SR/IOV. Reviewed-by: Marcel Apfelbaum Signed-off-by: Knut Omang --- hw/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index b0bf540..b095cfe 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1840,7 +1840,7 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp) bus = PCI_BUS(qdev_get_parent_bus(qdev)); pci_dev = do_pci_register_device(pci_dev, bus, object_get_typename(OBJECT(qdev)), - pci_dev->devfn, errp); + object_property_get_int(OBJECT(qdev), "addr", NULL), errp); if (pci_dev == NULL) return; -- 2.4.3