qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v6 1/4] pci: Make use of the devfn property when reg


From: Knut Omang
Subject: [Qemu-devel] [PATCH v6 1/4] pci: Make use of the devfn property when registering new devices
Date: Thu, 22 Oct 2015 10:01:32 +0200

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 <address@hidden>
Signed-off-by: Knut Omang <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]