Re: [PATCH RFCv2 03/24] vfio: Move iova_bitmap into iommu core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 18/05/2023 23:35, Alex Williamson wrote:
> On Thu, 18 May 2023 21:46:29 +0100
> Joao Martins <joao.m.martins@xxxxxxxxxx> wrote:
> 
>> Both VFIO and IOMMUFD will need iova bitmap for storing dirties and walking
>> the user bitmaps, so move to the common dependency into IOMMU core. IOMMUFD
>> can't exactly host it given that VFIO dirty tracking can be used without
>> IOMMUFD.
>>
>> Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx>
>> ---
>>  drivers/iommu/Makefile                | 1 +
>>  drivers/{vfio => iommu}/iova_bitmap.c | 0
>>  drivers/vfio/Makefile                 | 3 +--
>>  3 files changed, 2 insertions(+), 2 deletions(-)
>>  rename drivers/{vfio => iommu}/iova_bitmap.c (100%)
>>
>> diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
>> index 769e43d780ce..9d9dfbd2dfc2 100644
>> --- a/drivers/iommu/Makefile
>> +++ b/drivers/iommu/Makefile
>> @@ -10,6 +10,7 @@ obj-$(CONFIG_IOMMU_IO_PGTABLE_ARMV7S) += io-pgtable-arm-v7s.o
>>  obj-$(CONFIG_IOMMU_IO_PGTABLE_LPAE) += io-pgtable-arm.o
>>  obj-$(CONFIG_IOMMU_IO_PGTABLE_DART) += io-pgtable-dart.o
>>  obj-$(CONFIG_IOMMU_IOVA) += iova.o
>> +obj-$(CONFIG_IOMMU_IOVA) += iova_bitmap.o
>>  obj-$(CONFIG_OF_IOMMU)	+= of_iommu.o
>>  obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o
>>  obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
>> diff --git a/drivers/vfio/iova_bitmap.c b/drivers/iommu/iova_bitmap.c
>> similarity index 100%
>> rename from drivers/vfio/iova_bitmap.c
>> rename to drivers/iommu/iova_bitmap.c
>> diff --git a/drivers/vfio/Makefile b/drivers/vfio/Makefile
>> index 57c3515af606..f9cc32a9810c 100644
>> --- a/drivers/vfio/Makefile
>> +++ b/drivers/vfio/Makefile
>> @@ -1,8 +1,7 @@
>>  # SPDX-License-Identifier: GPL-2.0
>>  obj-$(CONFIG_VFIO) += vfio.o
>>  
>> -vfio-y += vfio_main.o \
>> -	  iova_bitmap.o
>> +vfio-y += vfio_main.o
>>  vfio-$(CONFIG_VFIO_DEVICE_CDEV) += device_cdev.o
>>  vfio-$(CONFIG_VFIO_GROUP) += group.o
>>  vfio-$(CONFIG_IOMMUFD) += iommufd.o
> 
> Doesn't this require more symbols to be exported for vfio?  I only see
> iova_bitmap_set() as currently exported for vfio-pci variant drivers,
> but vfio needs iova_bitmap_alloc(), iova_bitmap_free(), and
> iova_bitmap_for_each(). 

It does, my mistake. I was using builtin for rapid iteration and forgot the most
obvious thing to build iommufd=m I'll fix with with a precedecessor patch
exporting the needed symbols

> Otherwise I'm happy to see it move to its new
> home ;)  Thanks,
> 
;)



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux