summaryrefslogtreecommitdiff
path: root/drivers/vfio/Makefile
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2022-11-29 23:31:54 +0300
committerJason Gunthorpe <jgg@nvidia.com>2022-12-02 18:52:04 +0300
commite5a9ec7e096ab7a3b34022409a6ddc63e4e83674 (patch)
treebe7d799b4cb77e6505e164bd5e5de628f72749cd /drivers/vfio/Makefile
parent81ab9890da97e07862476bf635c80adee9b1c515 (diff)
downloadlinux-e5a9ec7e096ab7a3b34022409a6ddc63e4e83674.tar.xz
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>
Diffstat (limited to 'drivers/vfio/Makefile')
-rw-r--r--drivers/vfio/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
index 3863922529ef..b953517dc70f 100644
--- a/drivers/vfio/Makefile
+++ b/drivers/vfio/Makefile
@@ -4,9 +4,9 @@ vfio_virqfd-y := virqfd.o
obj-$(CONFIG_VFIO) += vfio.o
vfio-y += vfio_main.o \
- iova_bitmap.o \
- container.o
+ iova_bitmap.o
vfio-$(CONFIG_IOMMUFD) += iommufd.o
+vfio-$(CONFIG_VFIO_CONTAINER) += container.o
obj-$(CONFIG_VFIO_VIRQFD) += vfio_virqfd.o
obj-$(CONFIG_VFIO_IOMMU_TYPE1) += vfio_iommu_type1.o