Thread (99 messages) 99 messages, 6 authors, 2021-05-11

Re: [PATCH 11/16] iommu/dma: Support PCI P2PDMA pages in dma-iommu map_sg

From: Logan Gunthorpe <logang@deltatee.com>
Date: 2021-04-27 22:59:52
Also in: linux-iommu, linux-mm, linux-nvme, linux-pci, lkml


On 2021-04-27 1:43 p.m., Jason Gunthorpe wrote:
On Thu, Apr 08, 2021 at 11:01:18AM -0600, Logan Gunthorpe wrote:
quoted
When a PCI P2PDMA page is seen, set the IOVA length of the segment
to zero so that it is not mapped into the IOVA. Then, in finalise_sg(),
apply the appropriate bus address to the segment. The IOVA is not
created if the scatterlist only consists of P2PDMA pages.
I expect P2P to work with systems that use ATS, so we'd want to see
those systems have the IOMMU programmed with the bus address.
Oh, the paragraph you quote isn't quite as clear as it could be. The bus
address is only used in specific circumstances depending on how the
P2PDMA core code figures the addresses should be mapped (see the
documentation for (upstream_bridge_distance()). The P2PDMA code
currently doesn't have any provisions for ATS (I haven't had access to
any such hardware) but I'm sure it wouldn't be too hard to add.

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