Thread (51 messages) 51 messages, 6 authors, 2024-07-13

Re: [RFC PATCH v1 18/18] nvme-pci: use new dma API

From: Leon Romanovsky <leon@kernel.org>
Date: 2024-07-05 18:48:51
Also in: kvm, linux-iommu, linux-mm, linux-nvme, linux-pci, linux-rdma, lkml

On Fri, Jul 05, 2024 at 07:58:06AM +0200, Christoph Hellwig wrote:
quoted
This is exactly how dma_map_sg() works.
Which dma_map_sg?  swiotlb handling is implemented in the underlying
ops, dma-direct and dma-iommu specifically.

dma-direct just iterates over the entries and calls dma_direct_map_page,
which does a per-entry decision to bounce based on
is_swiotlb_force_bounce, dma_capable and dma_kmalloc_needs_bounce.
dma-direct is not going to have "use_iova" flag. Robin pointed to
dma-iommu path.

In that case the flow is dma_map_sg()->iommu_dma_map_sg()->dev_use_sg_swiotlb().

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help