From: Leon Romanovsky <leon@kernel.org>
To: Jens Axboe <axboe@kernel.dk>, Keith Busch <kbusch@kernel.org>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-nvme@lists.infradead.org
Subject: [PATCH v3 0/2] block: Enable proper MMIO memory handling for P2P DMA
Date: Mon, 27 Oct 2025 09:30:19 +0200 [thread overview]
Message-ID: <20251027-block-with-mmio-v3-0-ac3370e1f7b7@nvidia.com> (raw)
Changelog:
v3:
* Encoded p2p map type in IOD flags instead of DMA attributes.
* Removed REQ_P2PDMA flag from block layer.
* Simplified map_phys conversion patch.
v2: https://lore.kernel.org/all/20251020-block-with-mmio-v2-0-147e9f93d8d4@nvidia.com/
* Added Chirstoph's Reviewed-by tag for first patch.
* Squashed patches
* Stored DMA MMIO attribute in NVMe IOD flags variable instead of block layer.
v1: https://patch.msgid.link/20251017-block-with-mmio-v1-0-3f486904db5e@nvidia.com
* Reordered patches.
* Dropped patch which tried to unify unmap flow.
* Set MMIO flag separately for data and integrity payloads.
v0: https://lore.kernel.org/all/cover.1760369219.git.leon@kernel.org/
----------------------------------------------------------------------
This patch series improves block layer and NVMe driver support for MMIO
memory regions, particularly for peer-to-peer (P2P) DMA transfers that
go through the host bridge.
The series addresses a critical gap where P2P transfers through the host
bridge (PCI_P2PDMA_MAP_THRU_HOST_BRIDGE) were not properly marked as
MMIO memory, leading to potential issues with:
- Inappropriate CPU cache synchronization operations on MMIO regions
- Incorrect DMA mapping/unmapping that doesn't respect MMIO semantics
- Missing IOMMU configuration for MMIO memory handling
This work is extracted from the larger DMA physical API improvement
series [1] and focuses specifically on block layer and NVMe requirements
for MMIO memory support.
Thanks
[1] https://lore.kernel.org/all/cover.1757423202.git.leonro@nvidia.com/
Leon Romanovsky (2):
nvme-pci: migrate to dma_map_phys instead of map_page
block-dma: properly take MMIO path
block/blk-mq-dma.c | 19 ++++++----
drivers/nvme/host/pci.c | 86 +++++++++++++++++++++++++++++++++++--------
include/linux/bio-integrity.h | 1 -
include/linux/blk-integrity.h | 14 -------
include/linux/blk-mq-dma.h | 28 +++++++-------
include/linux/blk_types.h | 2 -
6 files changed, 95 insertions(+), 55 deletions(-)
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251016-block-with-mmio-02acf4285427
Best regards,
--
Leon Romanovsky <leonro@nvidia.com>
next reply other threads:[~2025-10-27 7:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 7:30 Leon Romanovsky [this message]
2025-10-27 7:30 ` [PATCH v3 1/2] nvme-pci: migrate to dma_map_phys instead of map_page Leon Romanovsky
2025-10-27 7:30 ` [PATCH v3 2/2] block-dma: properly take MMIO path Leon Romanovsky
2025-10-27 7:49 ` Christoph Hellwig
2025-10-27 7:57 ` Leon Romanovsky
2025-10-27 8:11 ` Leon Romanovsky
2025-10-27 8:16 ` Christoph Hellwig
2025-10-27 8:22 ` Leon Romanovsky
2025-11-12 14:38 ` Keith Busch
2025-11-12 15:16 ` Leon Romanovsky
2025-11-12 15:23 ` Keith Busch
2025-11-12 18:30 ` Leon Romanovsky
2025-11-09 7:53 ` [PATCH v3 0/2] block: Enable proper MMIO memory handling for P2P DMA Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251027-block-with-mmio-v3-0-ac3370e1f7b7@nvidia.com \
--to=leon@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).