On 2025-07-24 02:13, Leon Romanovsky wrote: > On Thu, Jul 24, 2025 at 10:03:13AM +0200, Christoph Hellwig wrote: >> On Wed, Jul 23, 2025 at 04:00:06PM +0300, Leon Romanovsky wrote: >>> From: Leon Romanovsky <leo...@nvidia.com> >>> >>> Export the pci_p2pdma_map_type() function to allow external modules >>> and subsystems to determine the appropriate mapping type for P2PDMA >>> transfers between a provider and target device. >> >> External modules have no business doing this. > > VFIO PCI code is built as module. There is no way to access PCI p2p code > without exporting functions in it. The solution that would make more sense to me would be for either dma_iova_try_alloc() or another helper in dma-iommu.c to handle the P2PDMA case. dma-iommu.c already uses those same interfaces and thus there would be no need to export the low level helpers from the p2pdma code. Logan
- [PATCH 03/10] PCI/P2PDMA: Simplify bus address mapping API Leon Romanovsky
- [PATCH 02/10] PCI/P2PDMA: Introduce p2pdma_provider struct... Leon Romanovsky
- Re: [PATCH 02/10] PCI/P2PDMA: Introduce p2pdma_provid... Leon Romanovsky
- Re: [PATCH 02/10] PCI/P2PDMA: Introduce p2pdma_pr... Leon Romanovsky
- Re: [PATCH 02/10] PCI/P2PDMA: Introduce p2pdma_pr... Jason Gunthorpe
- Re: [PATCH 02/10] PCI/P2PDMA: Introduce p2pdm... Leon Romanovsky
- Re: [PATCH 02/10] PCI/P2PDMA: Introduce p... Leon Romanovsky
- Re: [PATCH 02/10] PCI/P2PDMA: Introduce p2pdma_provid... Jason Gunthorpe
- [PATCH 05/10] PCI/P2PDMA: Export pci_p2pdma_map_type() fun... Leon Romanovsky
- Re: [PATCH 05/10] PCI/P2PDMA: Export pci_p2pdma_map_t... Leon Romanovsky
- Re: [PATCH 05/10] PCI/P2PDMA: Export pci_p2pdma_m... Logan Gunthorpe
- Re: [PATCH 05/10] PCI/P2PDMA: Export pci_p2pd... Leon Romanovsky
- Re: [PATCH 05/10] PCI/P2PDMA: Export pci_... Logan Gunthorpe
- Re: [PATCH 05/10] PCI/P2PDMA: Export... Leon Romanovsky
- Re: [PATCH 05/10] PCI/P2PDMA: Export pci_p2pd... Jason Gunthorpe
- Re: [PATCH 05/10] PCI/P2PDMA: Export pci_... Logan Gunthorpe
- Re: [PATCH 05/10] PCI/P2PDMA: Export... Leon Romanovsky
- Re: [PATCH 05/10] PCI/P2PDMA: Ex... Logan Gunthorpe
- Re: [PATCH 05/10] PCI/P2PDMA: Ex... Jason Gunthorpe
- Re: [PATCH 05/10] PCI/P2PDMA: Ex... Logan Gunthorpe
- Re: [PATCH 05/10] PCI/P2PDMA: Ex... Jason Gunthorpe