vfio: Split the container logic into vfio_container_attach_group()
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 22 Sep 2022 19:20:21 +0000 (16:20 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 22 Sep 2022 21:46:06 +0000 (15:46 -0600)
commit03e650f6611563c0ccbd0d769d5748fd10d8ee8e
tree4fafa9164c0a4961dc75261d6fc098ac833f9bbb
parent429a781c8e01c24ebb2b9da0a63a14e6fd9e0837
vfio: Split the container logic into vfio_container_attach_group()

This splits up the ioctl of vfio_group_ioctl_set_container() so it
determines the type of file then invokes a type specific attachment
function. Future patches will add iommufd to this function as an
alternative type.

A following patch will move the vfio_container functions to their own .c
file.

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/3-v3-297af71838d2+b9-vfio_container_split_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_main.c