vfio: Make vfio_container optionally compiled
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 29 Nov 2022 20:31:54 +0000 (16:31 -0400)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 2 Dec 2022 15:52:04 +0000 (11:52 -0400)
commite5a9ec7e096ab7a3b34022409a6ddc63e4e83674
treebe7d799b4cb77e6505e164bd5e5de628f72749cd
parent81ab9890da97e07862476bf635c80adee9b1c515
vfio: Make vfio_container optionally compiled

Add a kconfig CONFIG_VFIO_CONTAINER that controls compiling the container
code. If 'n' then only iommufd will provide the container service. All the
support for vfio iommu drivers, including type1, will not be built.

This allows a compilation check that no inappropriate dependencies between
the device/group and container have been created.

Link: https://lore.kernel.org/r/9-v4-42cd2eb0e3eb+335a-vfio_iommufd_jgg@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Yi Liu <yi.l.liu@intel.com>
Tested-by: Lixiao Yang <lixiao.yang@intel.com>
Tested-by: Matthew Rosato <mjrosato@linux.ibm.com>
Tested-by: Yu He <yu.he@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/vfio/Kconfig
drivers/vfio/Makefile
drivers/vfio/vfio.h