public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] RDMA: Enable operation with DMA debug enabled
@ 2026-03-11 19:08 Leon Romanovsky
  2026-03-11 19:08 ` [PATCH v2 1/8] dma-debug: Allow multiple invocations of overlapping entries Leon Romanovsky
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Leon Romanovsky @ 2026-03-11 19:08 UTC (permalink / raw)
  To: Marek Szyprowski, Robin Murphy, Michael S. Tsirkin, Petr Tesarik,
	Jonathan Corbet, Shuah Khan, Jason Wang, Xuan Zhuo,
	Eugenio Pérez, Jason Gunthorpe, Leon Romanovsky,
	Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Joerg Roedel,
	Will Deacon, Andrew Morton
  Cc: iommu, linux-kernel, linux-doc, virtualization, linux-rdma,
	linux-trace-kernel, linux-mm

Add a new DMA_ATTR_REQUIRE_COHERENT attribute to the DMA API to mark
mappings that must run on a DMA‑coherent system. Such buffers cannot
use the SWIOTLB path, may overlap with CPU caches, and do not depend on
explicit cache flushing.

Mappings using this attribute are rejected on systems where cache
side‑effects could lead to data corruption, and therefore do not need
the cache‑overlap debugging logic. This series also includes fixes for
DMA_ATTR_CPU_CACHE_CLEAN handling.
Thanks.

---
Changes in v2:
- Added DMA_ATTR_REQUIRE_COHERENT attribute
- Added HMM patch which needs this attribute as well
- Renamed DMA_ATTR_CPU_CACHE_CLEAN to be DMA_ATTR_DEBUGGING_IGNORE_CACHELINES
- Link to v1: https://patch.msgid.link/20260307-dma-debug-overlap-v1-0-c034c38872af@nvidia.com

---
Leon Romanovsky (8):
      dma-debug: Allow multiple invocations of overlapping entries
      dma-mapping: handle DMA_ATTR_CPU_CACHE_CLEAN in trace output
      dma-mapping: Clarify valid conditions for CPU cache line overlap
      dma-mapping: Introduce DMA require coherency attribute
      dma-direct: prevent SWIOTLB path when DMA_ATTR_REQUIRE_COHERENT is set
      iommu/dma: add support for DMA_ATTR_REQUIRE_COHERENT attribute
      RDMA/umem: Tell DMA mapping that UMEM requires coherency
      mm/hmm: Indicate that HMM requires DMA coherency

 Documentation/core-api/dma-attributes.rst | 34 +++++++++++++++++++++++--------
 drivers/infiniband/core/umem.c            |  5 +++--
 drivers/iommu/dma-iommu.c                 | 21 +++++++++++++++----
 drivers/virtio/virtio_ring.c              | 10 ++++-----
 include/linux/dma-mapping.h               | 15 ++++++++++----
 include/trace/events/dma.h                |  4 +++-
 kernel/dma/debug.c                        |  9 ++++----
 kernel/dma/direct.h                       |  7 ++++---
 kernel/dma/mapping.c                      |  6 ++++++
 mm/hmm.c                                  |  4 ++--
 10 files changed, 82 insertions(+), 33 deletions(-)
---
base-commit: 11439c4635edd669ae435eec308f4ab8a0804808
change-id: 20260305-dma-debug-overlap-21487c3fa02c

Best regards,
--  
Leon Romanovsky <leonro@nvidia.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-03-12 16:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 19:08 [PATCH v2 0/8] RDMA: Enable operation with DMA debug enabled Leon Romanovsky
2026-03-11 19:08 ` [PATCH v2 1/8] dma-debug: Allow multiple invocations of overlapping entries Leon Romanovsky
2026-03-11 19:08 ` [PATCH v2 2/8] dma-mapping: handle DMA_ATTR_CPU_CACHE_CLEAN in trace output Leon Romanovsky
2026-03-11 19:08 ` [PATCH v2 3/8] dma-mapping: Clarify valid conditions for CPU cache line overlap Leon Romanovsky
2026-03-11 19:08 ` [PATCH v2 4/8] dma-mapping: Introduce DMA require coherency attribute Leon Romanovsky
2026-03-12 12:19   ` Jason Gunthorpe
2026-03-12 16:46     ` Leon Romanovsky
2026-03-11 19:08 ` [PATCH v2 5/8] dma-direct: prevent SWIOTLB path when DMA_ATTR_REQUIRE_COHERENT is set Leon Romanovsky
2026-03-12 12:20   ` Jason Gunthorpe
2026-03-12 16:47     ` Leon Romanovsky
2026-03-11 19:08 ` [PATCH v2 6/8] iommu/dma: add support for DMA_ATTR_REQUIRE_COHERENT attribute Leon Romanovsky
2026-03-11 19:08 ` [PATCH v2 7/8] RDMA/umem: Tell DMA mapping that UMEM requires coherency Leon Romanovsky
2026-03-12 12:22   ` Jason Gunthorpe
2026-03-12 12:34   ` Jason Gunthorpe
2026-03-11 19:08 ` [PATCH v2 8/8] mm/hmm: Indicate that HMM requires DMA coherency Leon Romanovsky
2026-03-12 12:26   ` Jason Gunthorpe
2026-03-12 16:50     ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox