> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Tuesday, January 17, 2023 9:34 PM > > On Tue, Jan 17, 2023 at 05:14:12AM +0000, Liu, Yi L wrote: > > Hi Jason, > > > > > diff --git a/drivers/vfio/iommufd.c b/drivers/vfio/iommufd.c > > > index 4f82a6fa7c6c7f..79a781a4e74c09 100644 > > > --- a/drivers/vfio/iommufd.c > > > +++ b/drivers/vfio/iommufd.c > > > @@ -18,6 +18,21 @@ int vfio_iommufd_bind(struct vfio_device *vdev, > > > struct iommufd_ctx *ictx) > > > > > > lockdep_assert_held(&vdev->dev_set->lock); > > > > > > + if (IS_ENABLED(CONFIG_VFIO_NOIOMMU) && > > > + vdev->group->type == VFIO_NO_IOMMU) { > > > > This should be done with a helper provided by group.c as it tries > > to decode the group fields. Is it? > > It will make your cdev series easier Yep 😊 I've just sent out a new cdev version. Not based on this patch yet. Would get it be when this patch got merged. Regards, Yi Liu