Hi Eric, > From: Auger Eric [mailto:eric.auger@xxxxxxxxxx] > Sent: Tuesday, July 9, 2019 4:38 PM > To: Liu, Yi L <yi.l.liu@xxxxxxxxx>; qemu-devel@xxxxxxxxxx; mst@xxxxxxxxxx; > Subject: Re: [RFC v1 07/18] hw/pci: add pci_device_bind/unbind_gpasid > > Hi Liu, > > On 7/5/19 1:01 PM, Liu Yi L wrote: > > This patch adds two callbacks pci_device_bind/unbind_gpasid() to > > PCIPASIDOps. These two callbacks are used to propagate guest pasid > > bind/unbind to host. The implementations of the callbacks would be > > device passthru modules like vfio. > > > > Cc: Kevin Tian <kevin.tian@xxxxxxxxx> > > Cc: Jacob Pan <jacob.jun.pan@xxxxxxxxxxxxxxx> > > Cc: Peter Xu <peterx@xxxxxxxxxx> > > Cc: Eric Auger <eric.auger@xxxxxxxxxx> > > Cc: Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx> > > Cc: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> > > Signed-off-by: Liu Yi L <yi.l.liu@xxxxxxxxx> > > --- > > hw/pci/pci.c | 30 ++++++++++++++++++++++++++++++ > > include/hw/pci/pci.h | 9 +++++++++ > > 2 files changed, 39 insertions(+) > > > > diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 710f9e9..2229229 100644 > > --- a/hw/pci/pci.c > > +++ b/hw/pci/pci.c > > @@ -2676,6 +2676,36 @@ int pci_device_request_pasid_free(PCIBus *bus, > int32_t devfn, > > return -1; > > } > > > > +void pci_device_bind_gpasid(PCIBus *bus, int32_t devfn, > > + struct gpasid_bind_data *g_bind_data) > struct gpasid_bind_data is defined in linux headers so I think you would > need: #ifdef __linux__ Oops, thanks for the remind. Regards, Yi Liu