linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 00/16] dma-mapping: migrate to physical address-based API
@ 2025-08-04 12:42 Leon Romanovsky
  2025-08-04 12:42 ` [PATCH v1 01/16] dma-mapping: introduce new DMA attribute to indicate MMIO memory Leon Romanovsky
                   ` (16 more replies)
  0 siblings, 17 replies; 43+ messages in thread
From: Leon Romanovsky @ 2025-08-04 12:42 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Jason Gunthorpe, Abdiel Janulgue, Alexander Potapenko,
	Alex Gaynor, Andrew Morton, Christoph Hellwig, Danilo Krummrich,
	iommu, Jason Wang, Jens Axboe, Joerg Roedel, Jonathan Corbet,
	Juergen Gross, kasan-dev, Keith Busch, linux-block, linux-doc,
	linux-kernel, linux-mm, linux-nvme, linuxppc-dev,
	linux-trace-kernel, Madhavan Srinivasan, Masami Hiramatsu,
	Michael Ellerman, Michael S. Tsirkin, Miguel Ojeda, Robin Murphy,
	rust-for-linux, Sagi Grimberg, Stefano Stabellini, Steven Rostedt,
	virtualization, Will Deacon, xen-devel

Changelog:
v1:
 * Added new DMA_ATTR_MMIO attribute to indicate
   PCI_P2PDMA_MAP_THRU_HOST_BRIDGE path.
 * Rewrote dma_map_* functions to use thus new attribute
v0: https://lore.kernel.org/all/cover.1750854543.git.leon@kernel.org/
------------------------------------------------------------------------

This series refactors the DMA mapping to use physical addresses
as the primary interface instead of page+offset parameters. This
change aligns the DMA API with the underlying hardware reality where
DMA operations work with physical addresses, not page structures.

The series maintains export symbol backward compatibility by keeping
the old page-based API as wrapper functions around the new physical
address-based implementations.

Thanks

Leon Romanovsky (16):
  dma-mapping: introduce new DMA attribute to indicate MMIO memory
  iommu/dma: handle MMIO path in dma_iova_link
  dma-debug: refactor to use physical addresses for page mapping
  dma-mapping: rename trace_dma_*map_page to trace_dma_*map_phys
  iommu/dma: rename iommu_dma_*map_page to iommu_dma_*map_phys
  iommu/dma: extend iommu_dma_*map_phys API to handle MMIO memory
  dma-mapping: convert dma_direct_*map_page to be phys_addr_t based
  kmsan: convert kmsan_handle_dma to use physical addresses
  dma-mapping: handle MMIO flow in dma_map|unmap_page
  xen: swiotlb: Open code map_resource callback
  dma-mapping: export new dma_*map_phys() interface
  mm/hmm: migrate to physical address-based DMA mapping API
  mm/hmm: properly take MMIO path
  block-dma: migrate to dma_map_phys instead of map_page
  block-dma: properly take MMIO path
  nvme-pci: unmap MMIO pages with appropriate interface

 Documentation/core-api/dma-api.rst        |   4 +-
 Documentation/core-api/dma-attributes.rst |   7 ++
 arch/powerpc/kernel/dma-iommu.c           |   4 +-
 block/blk-mq-dma.c                        |  15 ++-
 drivers/iommu/dma-iommu.c                 |  69 +++++++------
 drivers/nvme/host/pci.c                   |  18 +++-
 drivers/virtio/virtio_ring.c              |   4 +-
 drivers/xen/swiotlb-xen.c                 |  21 +++-
 include/linux/blk-mq-dma.h                |   6 +-
 include/linux/blk_types.h                 |   2 +
 include/linux/dma-direct.h                |   2 -
 include/linux/dma-map-ops.h               |   8 +-
 include/linux/dma-mapping.h               |  27 +++++
 include/linux/iommu-dma.h                 |  11 +--
 include/linux/kmsan.h                     |  12 ++-
 include/trace/events/dma.h                |   9 +-
 kernel/dma/debug.c                        |  71 ++++---------
 kernel/dma/debug.h                        |  37 ++-----
 kernel/dma/direct.c                       |  22 +----
 kernel/dma/direct.h                       |  50 ++++++----
 kernel/dma/mapping.c                      | 115 +++++++++++++---------
 kernel/dma/ops_helpers.c                  |   6 +-
 mm/hmm.c                                  |  19 ++--
 mm/kmsan/hooks.c                          |  36 +++++--
 rust/kernel/dma.rs                        |   3 +
 tools/virtio/linux/kmsan.h                |   2 +-
 26 files changed, 320 insertions(+), 260 deletions(-)

-- 
2.50.1


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

end of thread, other threads:[~2025-08-14 14:14 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 12:42 [PATCH v1 00/16] dma-mapping: migrate to physical address-based API Leon Romanovsky
2025-08-04 12:42 ` [PATCH v1 01/16] dma-mapping: introduce new DMA attribute to indicate MMIO memory Leon Romanovsky
2025-08-06 17:31   ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 02/16] iommu/dma: handle MMIO path in dma_iova_link Leon Romanovsky
2025-08-06 18:10   ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 03/16] dma-debug: refactor to use physical addresses for page mapping Leon Romanovsky
2025-08-06 18:26   ` Jason Gunthorpe
2025-08-06 18:38     ` Leon Romanovsky
2025-08-04 12:42 ` [PATCH v1 04/16] dma-mapping: rename trace_dma_*map_page to trace_dma_*map_phys Leon Romanovsky
2025-08-04 12:42 ` [PATCH v1 05/16] iommu/dma: rename iommu_dma_*map_page to iommu_dma_*map_phys Leon Romanovsky
2025-08-06 18:44   ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 06/16] iommu/dma: extend iommu_dma_*map_phys API to handle MMIO memory Leon Romanovsky
2025-08-07 12:07   ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 07/16] dma-mapping: convert dma_direct_*map_page to be phys_addr_t based Leon Romanovsky
2025-08-07 12:13   ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 08/16] kmsan: convert kmsan_handle_dma to use physical addresses Leon Romanovsky
2025-08-07 12:21   ` Jason Gunthorpe
2025-08-13 15:07     ` Leon Romanovsky
2025-08-14 12:13       ` Jason Gunthorpe
2025-08-14 12:35         ` Leon Romanovsky
2025-08-14 12:44           ` Jason Gunthorpe
2025-08-14 13:31             ` Leon Romanovsky
2025-08-14 14:14               ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 09/16] dma-mapping: handle MMIO flow in dma_map|unmap_page Leon Romanovsky
2025-08-07 13:08   ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 10/16] xen: swiotlb: Open code map_resource callback Leon Romanovsky
2025-08-07 14:40   ` Jürgen Groß
2025-08-04 12:42 ` [PATCH v1 11/16] dma-mapping: export new dma_*map_phys() interface Leon Romanovsky
2025-08-07 13:38   ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 12/16] mm/hmm: migrate to physical address-based DMA mapping API Leon Romanovsky
2025-08-07 13:14   ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 13/16] mm/hmm: properly take MMIO path Leon Romanovsky
2025-08-07 13:14   ` Jason Gunthorpe
2025-08-04 12:42 ` [PATCH v1 14/16] block-dma: migrate to dma_map_phys instead of map_page Leon Romanovsky
2025-08-04 12:42 ` [PATCH v1 15/16] block-dma: properly take MMIO path Leon Romanovsky
2025-08-04 12:42 ` [PATCH v1 16/16] nvme-pci: unmap MMIO pages with appropriate interface Leon Romanovsky
2025-08-07 13:45   ` Jason Gunthorpe
2025-08-13 15:37     ` Leon Romanovsky
2025-08-07 14:19 ` [PATCH v1 00/16] dma-mapping: migrate to physical address-based API Jason Gunthorpe
2025-08-08 18:51   ` Marek Szyprowski
2025-08-09 13:34     ` Jason Gunthorpe
2025-08-09 16:53       ` Demi Marie Obenour
2025-08-10 17:02         ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).