[PATCH v2 1/5] mm/hmm: HMM API to enable P2P DMA for device private pages
Matthew Wilcox
willy at infradead.org
Fri Jul 18 14:17:00 UTC 2025
On Fri, Jul 18, 2025 at 02:51:08PM +0300, Yonatan Maman wrote:
> +++ b/include/linux/memremap.h
> @@ -89,6 +89,14 @@ struct dev_pagemap_ops {
> */
> vm_fault_t (*migrate_to_ram)(struct vm_fault *vmf);
>
> + /*
> + * Used for private (un-addressable) device memory only. Return a
> + * corresponding PFN for a page that can be mapped to device
> + * (e.g using dma_map_page)
> + */
> + int (*get_dma_pfn_for_device)(struct page *private_page,
> + unsigned long *dma_pfn);
This makes no sense. If a page is addressable then it has a PFN.
If a page is not addressable then it doesn't have a PFN.
More information about the dri-devel
mailing list