From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmOLk-0002q3-Sg for qemu-devel@nongnu.org; Wed, 14 Oct 2015 11:52:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmOLg-0002kC-5d for qemu-devel@nongnu.org; Wed, 14 Oct 2015 11:52:20 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:34261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmOLf-0002jl-JG for qemu-devel@nongnu.org; Wed, 14 Oct 2015 11:52:15 -0400 From: Knut Omang Date: Wed, 14 Oct 2015 17:51:15 +0200 Message-Id: <1444837878-11602-2-git-send-email-knut.omang@oracle.com> In-Reply-To: <1444837878-11602-1-git-send-email-knut.omang@oracle.com> References: <1444837878-11602-1-git-send-email-knut.omang@oracle.com> Subject: [Qemu-devel] [PATCH v5 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 , 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 Reviewed-by: Marcel Apfelbaum --- 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