Received: from eggs.gnu.org ([2001:4830:134:3::10]:50190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWnzs-0004cp-ST for qemu-devel@nongnu.org; Tue, 01 Sep 2015 12:01:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWnzp-0005Iy-6X for qemu-devel@nongnu.org; Tue, 01 Sep 2015 12:01:20 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:46615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWnzp-0005If-1F for qemu-devel@nongnu.org; Tue, 01 Sep 2015 12:01:17 -0400 From: Knut Omang Date: Tue, 1 Sep 2015 17:59:48 +0200 Message-Id: <1441123190-27667-2-git-send-email-knut.omang@oracle.com> In-Reply-To: <1441123190-27667-1-git-send-email-knut.omang@oracle.com> References: <1441123190-27667-1-git-send-email-knut.omang@oracle.com> Subject: [Qemu-devel] [PATCH v3 1/3] 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 , Paolo Bonzini , Dotan Barak , 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. 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 9f57aea..22951e0 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