Re: [Intel-gfx] [PATCH 07/10] vfio-iommufd: Support iommufd for physical VFIO devices

2022-11-04 Thread Jason Gunthorpe
On Tue, Nov 01, 2022 at 08:21:20AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Wednesday, October 26, 2022 2:51 AM > > > > +int vfio_iommufd_bind(struct vfio_device *vdev, struct iommufd_ctx *ictx) > > +{ > > + u32 ioas_id; > > + u32 device_id; > > + int ret; > > + > > +

Re: [Intel-gfx] [PATCH 07/10] vfio-iommufd: Support iommufd for physical VFIO devices

2022-11-01 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, October 26, 2022 2:51 AM > > +int vfio_iommufd_bind(struct vfio_device *vdev, struct iommufd_ctx *ictx) > +{ > + u32 ioas_id; > + u32 device_id; > + int ret; > + > + lockdep_assert_held(&vdev->dev_set->lock); > + > + /* > + * If

[Intel-gfx] [PATCH 07/10] vfio-iommufd: Support iommufd for physical VFIO devices

2022-10-25 Thread Jason Gunthorpe
This creates the iommufd_device for the physical VFIO drivers. These are all the drivers that are calling vfio_register_group_dev() and expect the type1 code to setup a real iommu_domain against their parent struct device. The design gives the driver a choice in how it gets connected to iommufd by