On Sun, Jul 27, 2025 at 03:51:58PM -0300, Jason Gunthorpe wrote:
On Thu, Jul 24, 2025 at 09:59:22AM +0200, Christoph Hellwig wrote:
On Thu, Jul 24, 2025 at 10:55:33AM +0300, Leon Romanovsky wrote:
Please, see last patch in the series https://lore.kernel.org/all/aea452cc27ca9e5169f7279d7b524190c39e7260.1753274... It gives me a way to call p2p code with stable pointer for whole BAR.
That simply can't work.
Why not?
That's the whole point of this, to remove struct page and use something else as a handle for the p2p when doing the DMA API stuff.
Because the struct page is the only thing that:
a) dma-mapping works on b) is the only place we can discover the routing information, but also more importantly ensure that the underlying page is still present and the device is not hot unplugged, or in a very theoretical worst case replaced by something else.