From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbNfn-0003d0-BV for qemu-devel@nongnu.org; Fri, 27 Mar 2015 02:23:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbNfi-0002Xu-7o for qemu-devel@nongnu.org; Fri, 27 Mar 2015 02:23:15 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:54424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbNfh-0002XW-Ij for qemu-devel@nongnu.org; Fri, 27 Mar 2015 02:23:10 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Mar 2015 16:22:55 +1000 From: Nikunj A Dadhania In-Reply-To: <5514CB9C.4000701@ozlabs.ru> References: <1427352132-1762-1-git-send-email-nikunj@linux.vnet.ibm.com> <1427352132-1762-2-git-send-email-nikunj@linux.vnet.ibm.com> <5514CB9C.4000701@ozlabs.ru> Date: Fri, 27 Mar 2015 11:51:58 +0530 Message-ID: <877fu3m03d.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/2] spapr: populate ibm,loc-code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, agraf@suse.de, david@gibson.dropbear.id.au Alexey Kardashevskiy 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 This was the reason, I had to move this code to hw/vfio/pci.c Is there a way to get that? Regards Nikunj