On Wed, Oct 18, 2023 at 09:26:59PM +0100, Joao Martins wrote: > Both VFIO and IOMMUFD will need iova bitmap for storing dirties and walking > the user bitmaps, so move to the common dependency into IOMMUFD. In doing > so, create the symbol IOMMUFD_DRIVER which designates the builtin code that > will be used by drivers when selected. Today this means MLX5_VFIO_PCI and > PDS_VFIO_PCI. IOMMU drivers will do the same (in future patches) when > supporting dirty tracking and select IOMMUFD_DRIVER accordingly. > > Given that the symbol maybe be disabled, add header definitions in > iova_bitmap.h for when IOMMUFD_DRIVER=n > > Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx> > --- > drivers/iommu/iommufd/Kconfig | 4 +++ > drivers/iommu/iommufd/Makefile | 1 + > drivers/{vfio => iommu/iommufd}/iova_bitmap.c | 0 > drivers/vfio/Makefile | 3 +-- > drivers/vfio/pci/mlx5/Kconfig | 1 + > drivers/vfio/pci/pds/Kconfig | 1 + > include/linux/iova_bitmap.h | 26 +++++++++++++++++++ > 7 files changed, 34 insertions(+), 2 deletions(-) > rename drivers/{vfio => iommu/iommufd}/iova_bitmap.c (100%) Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx> Jason