Thread (96 messages) flat view 96 messages, 10 authors, 2026-08-10

Re: [PATCH v8 01/23] dma-direct: return struct page from dma_direct_alloc_from_pool()

From: Jason Gunthorpe <jgg@ziepe.ca>
Date: 2026-07-27 04:24:19
Also in: linux-arm-kernel, linux-coco, linux-iommu, linux-s390, lkml, stable

On Sun, Jul 26, 2026 at 11:17:53AM +0300, Leon Romanovsky wrote:
Currently, the phys type universally describes memory and can be
reliably translated into any required representation. It is the most
fundamental type we have.
You cannot go from phys to page reliably unless you make assumptions
about the phys, that's the whole issue here. If the callchain expects
and intends to use a page it should really stay in a page and not take
a side trip to phys.

I agree it would help to have some helpers that were more phys based
for the callchains that want that since we are mixing two fairly
different activities in these functions..

But making phys the only output out of the pool isn't going to be an
improvement.

BTW how does a struct page even work for decrypted memory? You can't
actually use it that way right? If you try to access it then you'll
get the wrong IPA and it should explode?

Maybe we should be blocking the struct page path entirely for CC
shared?

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