Message ID | 20230923012511.10379-2-joao.m.martins@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | IOMMUFD Dirty Tracking | expand |
On Sat, Sep 23, 2023 at 02:24:53AM +0100, Joao Martins wrote: > In preparation to move iova_bitmap into iommufd, export the rest of API > symbols that will be used in what could be used by modules, namely: > > iova_bitmap_alloc > iova_bitmap_free > iova_bitmap_for_each > > Suggested-by: Alex Williamson <alex.williamson@redhat.com> > Signed-off-by: Joao Martins <joao.m.martins@oracle.com> > --- > drivers/vfio/iova_bitmap.c | 3 +++ > 1 file changed, 3 insertions(+) All iommufd symbols should be exported more like: drivers/iommu/iommufd/device.c:EXPORT_SYMBOL_NS_GPL(iommufd_device_replace, IOMMUFD); Including these. So please fix them all here too Jason
On 13/10/2023 16:43, Jason Gunthorpe wrote: > On Sat, Sep 23, 2023 at 02:24:53AM +0100, Joao Martins wrote: >> In preparation to move iova_bitmap into iommufd, export the rest of API >> symbols that will be used in what could be used by modules, namely: >> >> iova_bitmap_alloc >> iova_bitmap_free >> iova_bitmap_for_each >> >> Suggested-by: Alex Williamson <alex.williamson@redhat.com> >> Signed-off-by: Joao Martins <joao.m.martins@oracle.com> >> --- >> drivers/vfio/iova_bitmap.c | 3 +++ >> 1 file changed, 3 insertions(+) > > All iommufd symbols should be exported more like: > > drivers/iommu/iommufd/device.c:EXPORT_SYMBOL_NS_GPL(iommufd_device_replace, IOMMUFD); > > Including these. So please fix them all here too OK, Provided your comment on the next patch to move this into IOMMUFD. The IOMMU core didn't exported symbols that way, so I adhered to the style in-use.
On Fri, Oct 13, 2023 at 04:57:53PM +0100, Joao Martins wrote: > On 13/10/2023 16:43, Jason Gunthorpe wrote: > > On Sat, Sep 23, 2023 at 02:24:53AM +0100, Joao Martins wrote: > >> In preparation to move iova_bitmap into iommufd, export the rest of API > >> symbols that will be used in what could be used by modules, namely: > >> > >> iova_bitmap_alloc > >> iova_bitmap_free > >> iova_bitmap_for_each > >> > >> Suggested-by: Alex Williamson <alex.williamson@redhat.com> > >> Signed-off-by: Joao Martins <joao.m.martins@oracle.com> > >> --- > >> drivers/vfio/iova_bitmap.c | 3 +++ > >> 1 file changed, 3 insertions(+) > > > > All iommufd symbols should be exported more like: > > > > drivers/iommu/iommufd/device.c:EXPORT_SYMBOL_NS_GPL(iommufd_device_replace, IOMMUFD); > > > > Including these. So please fix them all here too > > OK, Provided your comment on the next patch to move this into IOMMUFD. > > The IOMMU core didn't exported symbols that way, so I adhered to the style in-use. Well, this commit message says "move iova_bitmap into iommufd" :) Jason
On 13/10/2023 17:03, Jason Gunthorpe wrote: > On Fri, Oct 13, 2023 at 04:57:53PM +0100, Joao Martins wrote: >> On 13/10/2023 16:43, Jason Gunthorpe wrote: >>> On Sat, Sep 23, 2023 at 02:24:53AM +0100, Joao Martins wrote: >>>> In preparation to move iova_bitmap into iommufd, export the rest of API >>>> symbols that will be used in what could be used by modules, namely: >>>> >>>> iova_bitmap_alloc >>>> iova_bitmap_free >>>> iova_bitmap_for_each >>>> >>>> Suggested-by: Alex Williamson <alex.williamson@redhat.com> >>>> Signed-off-by: Joao Martins <joao.m.martins@oracle.com> >>>> --- >>>> drivers/vfio/iova_bitmap.c | 3 +++ >>>> 1 file changed, 3 insertions(+) >>> >>> All iommufd symbols should be exported more like: >>> >>> drivers/iommu/iommufd/device.c:EXPORT_SYMBOL_NS_GPL(iommufd_device_replace, IOMMUFD); >>> >>> Including these. So please fix them all here too >> >> OK, Provided your comment on the next patch to move this into IOMMUFD. >> >> The IOMMU core didn't exported symbols that way, so I adhered to the style in-use. > > Well, this commit message says "move iova_bitmap into iommufd" :) :( It should have said 'into iommu core' just like the next patch which says "vfio: Move iova_bitmap into iommu core". let me fix that, but well no point now if the idea is to actually move to iommufd
diff --git a/drivers/vfio/iova_bitmap.c b/drivers/vfio/iova_bitmap.c index 0848f920efb7..f54b56388e00 100644 --- a/drivers/vfio/iova_bitmap.c +++ b/drivers/vfio/iova_bitmap.c @@ -268,6 +268,7 @@ struct iova_bitmap *iova_bitmap_alloc(unsigned long iova, size_t length, iova_bitmap_free(bitmap); return ERR_PTR(rc); } +EXPORT_SYMBOL_GPL(iova_bitmap_alloc); /** * iova_bitmap_free() - Frees an IOVA bitmap object @@ -289,6 +290,7 @@ void iova_bitmap_free(struct iova_bitmap *bitmap) kfree(bitmap); } +EXPORT_SYMBOL_GPL(iova_bitmap_free); /* * Returns the remaining bitmap indexes from mapped_total_index to process for @@ -387,6 +389,7 @@ int iova_bitmap_for_each(struct iova_bitmap *bitmap, void *opaque, return ret; } +EXPORT_SYMBOL_GPL(iova_bitmap_for_each); /** * iova_bitmap_set() - Records an IOVA range in bitmap
In preparation to move iova_bitmap into iommufd, export the rest of API symbols that will be used in what could be used by modules, namely: iova_bitmap_alloc iova_bitmap_free iova_bitmap_for_each Suggested-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Joao Martins <joao.m.martins@oracle.com> --- drivers/vfio/iova_bitmap.c | 3 +++ 1 file changed, 3 insertions(+)