On 03/27/2015 05:21 PM, Nikunj A Dadhania wrote:
Alexey Kardashevskiy <a...@ozlabs.ru> writes:
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 95d666e..dd97258 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3319,6 +3319,24 @@ static void vfio_unregister_req_notifier(VFIOPCIDevice
*vdev)
vdev->req_enabled = false;
}
+bool vfio_get_devspec(PCIDevice *pdev, char **value)
This function can live in hw/ppc/spapr_pci_vfio.c. Something like
object_property_get_str(OBJECT(pdev), "host", NULL) will return the host
address, and this is all you really want from VFIO here.
Looking more deeper, "host" is part of VFIOPCIDevice, which is not
available in hw/pci/spapr_pci_vfio.c
"host" is also a QOM's property of an VFIO PCI device instance. You do not
access it via VFIOPCIDevice::host directly but via
object_property_get_str() indirectly (which will fail if the device does
not have this property).
This was the reason, I had to move this code to hw/vfio/pci.c
Is there a way to get that?
--
Alexey