Thread (49 messages) 49 messages, 9 authors, 2017-10-15

Re: [PATCH v7 07/12] dma-mapping: introduce dma_has_iommu()

From: Dan Williams <hidden>
Date: 2017-10-06 23:12:27
Also in: linux-fsdevel, linux-mm, linux-rdma, linux-xfs, nvdimm

On Fri, Oct 6, 2017 at 3:52 PM, Dan Williams [off-list ref] wrote:
On Fri, Oct 6, 2017 at 3:45 PM, David Woodhouse [off-list ref] wrote:
quoted
On Fri, 2017-10-06 at 15:35 -0700, Dan Williams wrote:
quoted
Add a helper to determine if the dma mappings set up for a given device
are backed by an iommu. In particular, this lets code paths know that a
dma_unmap operation will revoke access to memory if the device can not
otherwise be quiesced. The need for this knowledge is driven by a need
to make RDMA transfers to DAX mappings safe. If the DAX file's block map
changes we need to be to reliably stop accesses to blocks that have been
freed or re-assigned to a new file.
"a dma_unmap operation revoke access to memory"... but it's OK that the
next *map* will give the same DMA address to someone else, right?
I'm assuming the next map will be to other physical addresses and a
different requester device since the memory is still registered
exclusively.
[ chatted with Ashok ]

Yes, it seems we need a way to pin that IOVA as in use, but invalidate
it. Then we can wait for the unmap to occur when the memory is
unregistered to avoid this IOVA reuse problem.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help