On 2021-11-09 14:25, Christoph Hellwig wrote:
On Thu, Nov 04, 2021 at 12:36:16PM +0000, Robin Murphy wrote:
- *dma_handle = phys_to_dma_direct(dev, page_to_phys(page));
- /* return the page pointer as the opaque cookie */
- return page;
- }
+ !force_dma_unencrypted(dev) && !is_swiotlb_for_alloc(dev))
Hmm, does force_dma_unencrypted() actually matter if the caller doesn't
want to access the buffer itself? Presumably any subsequent mmap() to
userspace would still do the right thing?
Well, force_dma_unencrypted is a bit misnamed I think. It is mostly
used to force bounce buffering for protected guest schemes.
Ah, that'll be what that small nagging doubt was at the time :)
Furthermore, implicit in the fact that the only comment I had was just
musing on the existing code being moved, feel free to have a
Reviewed-by: Robin Murphy <robin.mur...@arm.com>
for the refactor as-is.
Cheers,
Robin.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu