|
From: | Alexey Kardashevskiy |
Subject: | Re: [Qemu-devel] [PATCH 2/2] spapr: populate ibm,loc-code |
Date: | Fri, 27 Mar 2015 17:38:33 +1100 |
User-agent: | Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 03/27/2015 05:21 PM, Nikunj A Dadhania wrote:
Alexey Kardashevskiy <address@hidden> 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
[Prev in Thread] | Current Thread | [Next in Thread] |