> From: Jason Gunthorpe
> Sent: Saturday, July 15, 2023 9:05 PM
>
> On Sat, Jul 15, 2023 at 04:16:52AM +, Liu, Yi L wrote:
> > > From: Jason Gunthorpe
> > > Sent: Friday, July 14, 2023 10:42 PM
> > >
> > > On Mon, Jul 10, 2023 at 07:59:24PM -0700, Yi Liu wrote:
> > >
> > > > +static inline l
On Sat, Jul 15, 2023 at 04:16:52AM +, Liu, Yi L wrote:
> > From: Jason Gunthorpe
> > Sent: Friday, July 14, 2023 10:42 PM
> >
> > On Mon, Jul 10, 2023 at 07:59:24PM -0700, Yi Liu wrote:
> >
> > > +static inline long vfio_df_ioctl_bind_iommufd(struct vfio_device_file
> > > *df,
> > > +
> From: Jason Gunthorpe
> Sent: Friday, July 14, 2023 10:42 PM
>
> On Mon, Jul 10, 2023 at 07:59:24PM -0700, Yi Liu wrote:
>
> > +static inline long vfio_df_ioctl_bind_iommufd(struct vfio_device_file *df,
> > + struct vfio_device_bind_iommufd
> > __user
>
On Mon, Jul 10, 2023 at 07:59:24PM -0700, Yi Liu wrote:
> +static inline long vfio_df_ioctl_bind_iommufd(struct vfio_device_file *df,
> + struct vfio_device_bind_iommufd
> __user *arg)
> +{
> + return -EOPNOTSUPP;
> +}
This should be -ENOTTY
> @@ -1
This adds ioctl for userspace to bind device cdev fd to iommufd.
VFIO_DEVICE_BIND_IOMMUFD: bind device to an iommufd, hence gain DMA
control provided by the iommufd. open_device
op is called after bind_iommufd op.
Tested-by: Nicolin