* [RFC PATCH 0/4] dma-mapping: Add preservation of direct allocations
@ 2026-05-05 0:23 Samiullah Khawaja
2026-05-05 0:29 ` Samiullah Khawaja
0 siblings, 1 reply; 3+ messages in thread
From: Samiullah Khawaja @ 2026-05-05 0:23 UTC (permalink / raw)
To: Marek Szyprowski, Will Deacon, Jason Gunthorpe
Cc: Samiullah Khawaja, Pasha Tatashin, Mike Rapoport, Pratyush Yadav,
Alexander Graf, Robin Murphy, Kevin Tian, iommu, kexec, linux-mm,
linux-kernel, David Matlack, Andrew Morton, Pranjal Shrivastava,
Vipin Sharma
This is an RFC to discuss the preservation of DMA allocations for
devices that are using direct allocation mode. Note preservation here
means preservation of physical memory only using KHO. IOVAs and IOMMU
mappings are out of scope.
The complexity and need of this was discussed in the thread mentioned
below. It was proposed to allow preservation of only a subset of
allocations with minimum support.
https://lore.kernel.org/all/aepfYzkI7NsVGCF0@google.com/
https://lore.kernel.org/all/aepRy7Gp7Ng85Zr7@willie-the-truck/
Note DMA allocation allows allocation from various allocators in various
configurations. This RFC supports preservation with,
- Direct Allocation Only.
- Pages allocated through alloc_page (Buddy allocator).
- No CMA support.
- No DMA allocators.
The changes are also pushed here:
https://github.com/samikhawaja/linux/tree/dma-alloc-preserve-direct
Looking forward to your feedback on this.
Thanks
Samiullah Khawaja (4):
dma: Add DMA allocation preservation KHO ABI
dma/pool: Add an API to check if DMA allocation is from pool
dma-direct: Add API to preserve/restore allocations
dma-mapping: Add API to preserve/restore DMA allocation
include/linux/dma-direct.h | 29 ++++++
include/linux/dma-map-ops.h | 1 +
include/linux/dma-mapping.h | 50 +++++++++
include/linux/kho/abi/dma_alloc.h | 30 ++++++
kernel/dma/Kconfig | 3 +
kernel/dma/direct.c | 163 ++++++++++++++++++++++++++++++
kernel/dma/mapping.c | 52 ++++++++++
kernel/dma/pool.c | 13 +++
8 files changed, 341 insertions(+)
create mode 100644 include/linux/kho/abi/dma_alloc.h
base-commit: 9974969c14031a097d6b45bcb7a06bb4aa525c40
prerequisite-patch-id: 41f13f37cb3b439f17dfa4e3f2d5c767aaef0346
--
2.54.0.545.g6539524ca2-goog
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC PATCH 0/4] dma-mapping: Add preservation of direct allocations
@ 2026-05-05 0:27 Samiullah Khawaja
0 siblings, 0 replies; 3+ messages in thread
From: Samiullah Khawaja @ 2026-05-05 0:27 UTC (permalink / raw)
To: Marek Szyprowski, Will Deacon, Jason Gunthorpe
Cc: Samiullah Khawaja, Pasha Tatashin, Mike Rapoport, Pratyush Yadav,
Alexander Graf, Robin Murphy, Kevin Tian, iommu, kexec, linux-mm,
linux-kernel, David Matlack, Andrew Morton, Pranjal Shrivastava,
Vipin Sharma
This is an RFC to discuss the preservation of DMA allocations for
devices that are using direct allocation mode. Note preservation here
means preservation of physical memory only using KHO. IOVAs and IOMMU
mappings are out of scope.
The complexity and need of this was discussed in the thread mentioned
below. It was proposed to allow preservation of only a subset of
allocations with minimum support.
https://lore.kernel.org/all/aepfYzkI7NsVGCF0@google.com/
https://lore.kernel.org/all/aepRy7Gp7Ng85Zr7@willie-the-truck/
Note DMA allocation allows allocation from various allocators in various
configurations. This RFC supports preservation with,
- Direct Allocation Only.
- Pages allocated through alloc_page (Buddy allocator).
- No CMA support.
- No DMA allocators.
The changes are also pushed here:
https://github.com/samikhawaja/linux/tree/dma-alloc-preserve-direct
Looking forward to your feedback on this.
Thanks
Samiullah Khawaja (4):
dma: Add DMA allocation preservation KHO ABI
dma/pool: Add an API to check if DMA allocation is from pool
dma-direct: Add API to preserve/restore allocations
dma-mapping: Add API to preserve/restore DMA allocation
include/linux/dma-direct.h | 29 ++++++
include/linux/dma-map-ops.h | 1 +
include/linux/dma-mapping.h | 50 +++++++++
include/linux/kho/abi/dma_alloc.h | 30 ++++++
kernel/dma/Kconfig | 3 +
kernel/dma/direct.c | 163 ++++++++++++++++++++++++++++++
kernel/dma/mapping.c | 52 ++++++++++
kernel/dma/pool.c | 13 +++
8 files changed, 341 insertions(+)
create mode 100644 include/linux/kho/abi/dma_alloc.h
base-commit: 9974969c14031a097d6b45bcb7a06bb4aa525c40
--
2.54.0.545.g6539524ca2-goog
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH 0/4] dma-mapping: Add preservation of direct allocations
2026-05-05 0:23 [RFC PATCH 0/4] dma-mapping: Add preservation of direct allocations Samiullah Khawaja
@ 2026-05-05 0:29 ` Samiullah Khawaja
0 siblings, 0 replies; 3+ messages in thread
From: Samiullah Khawaja @ 2026-05-05 0:29 UTC (permalink / raw)
To: Marek Szyprowski, Will Deacon, Jason Gunthorpe
Cc: Pasha Tatashin, Mike Rapoport, Pratyush Yadav, Alexander Graf,
Robin Murphy, Kevin Tian, iommu, kexec, linux-mm, linux-kernel,
David Matlack, Andrew Morton, Pranjal Shrivastava, Vipin Sharma
On Tue, May 05, 2026 at 12:23:16AM +0000, Samiullah Khawaja wrote:
>This is an RFC to discuss the preservation of DMA allocations for
>devices that are using direct allocation mode. Note preservation here
>means preservation of physical memory only using KHO. IOVAs and IOMMU
>mappings are out of scope.
>
Sorry, please ignore this separate cover letter email. It was sent by
mistake and has wrong prerequisite-patch-id.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-05 0:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 0:23 [RFC PATCH 0/4] dma-mapping: Add preservation of direct allocations Samiullah Khawaja
2026-05-05 0:29 ` Samiullah Khawaja
-- strict thread matches above, loose matches on Subject: below --
2026-05-05 0:27 Samiullah Khawaja
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox