vfio-iommufd: Add detach_ioas support for physical VFIO devices
[linux-2.6-microblaze.git] / Documentation / driver-api / vfio.rst
index 68abc08..363e12c 100644 (file)
@@ -279,6 +279,7 @@ similar to a file operations structure::
                                        struct iommufd_ctx *ictx, u32 *out_device_id);
                void    (*unbind_iommufd)(struct vfio_device *vdev);
                int     (*attach_ioas)(struct vfio_device *vdev, u32 *pt_id);
+               void    (*detach_ioas)(struct vfio_device *vdev);
                int     (*open_device)(struct vfio_device *vdev);
                void    (*close_device)(struct vfio_device *vdev);
                ssize_t (*read)(struct vfio_device *vdev, char __user *buf,
@@ -315,9 +316,10 @@ container_of().
        - The [un]bind_iommufd callbacks are issued when the device is bound to
          and unbound from iommufd.
 
-       - The attach_ioas callback is issued when the device is attached to an
-         IOAS managed by the bound iommufd. The attached IOAS is automatically
-         detached when the device is unbound from iommufd.
+       - The [de]attach_ioas callback is issued when the device is attached to
+         and detached from an IOAS managed by the bound iommufd. However, the
+         attached IOAS can also be automatically detached when the device is
+         unbound from iommufd.
 
        - The read/write/mmap callbacks implement the device region access defined
          by the device's own VFIO_DEVICE_GET_REGION_INFO ioctl.