[Intel-gfx] [PATCH v5 06/10] vfio-iommufd: Add helper to retrieve iommufd_ctx and devid for vfio_device
Tian, Kevin
kevin.tian at intel.com
Fri May 19 07:57:47 UTC 2023
> From: Liu, Yi L <yi.l.liu at intel.com>
> Sent: Thursday, May 18, 2023 9:26 PM
> > > +int vfio_iommufd_physical_devid(struct vfio_device *vdev)
> > > +{
> > > + if (vdev->iommufd_device)
> > > + return iommufd_device_to_id(vdev->iommufd_device);
> > > + if (vdev->noiommu_access)
> > > + return iommufd_access_to_id(vdev->noiommu_access);
> > > + return -EINVAL;
> > > +}
> > > +EXPORT_SYMBOL_GPL(vfio_iommufd_physical_devid);
> >
> > I think these exemplify that it would be better if both emulated and
> > noiommu use the same iommufd_access pointer. Thanks,
>
> Sure. Then I shall rename this helper. vfio_iommufd_device_devid()
> What about your opinion?
>
Probably just vfio_iommufd_device_id().
More information about the Intel-gfx
mailing list