RE: [RFC 5/8] vfio: IOMMUFD relax requirement for noiommu mode
From: Tian, Kevin
Date: Thu Dec 11 2025 - 23:05:16 EST
> From: Jacob Pan <jacob.pan@xxxxxxxxxxxxxxxxxxx>
> Sent: Tuesday, December 2, 2025 1:30 AM
>
> noiommu device only has auto domain, does not need to attach to other ioas.
>
> Signed-off-by: Jacob Pan <jacob.pan@xxxxxxxxxxxxxxxxxxx>
> ---
> drivers/vfio/vfio_main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
> index 38c8e9350a60..805d30b0b82f 100644
> --- a/drivers/vfio/vfio_main.c
> +++ b/drivers/vfio/vfio_main.c
> @@ -317,9 +317,7 @@ static int __vfio_register_dev(struct vfio_device
> *device,
>
> if (WARN_ON(IS_ENABLED(CONFIG_IOMMUFD) &&
> (!device->ops->bind_iommufd ||
> - !device->ops->unbind_iommufd ||
> - !device->ops->attach_ioas ||
> - !device->ops->detach_ioas)))
> + !device->ops->unbind_iommufd)))
> return -EINVAL;
>
the subject says to relax for noiommu, but above actually relax
the check for all configs...