Linux block layer
 help / color / mirror / Atom feed
* [PATCH v2 0/5] dma-buf backed NVMe passthrough I/O
@ 2026-10-22 14:44 Anuj Gupta
  2026-10-22 14:44 ` [PATCH v2 1/5] io_uring/rsrc: pass import flags to io_import_reg_buf() Anuj Gupta
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Anuj Gupta @ 2026-10-22 14:44 UTC (permalink / raw)
  To: axboe, asml.silence, kbusch, hch, sagi, James.Bottomley, mkp,
	bernd, joannelkoong, miklos
  Cc: io-uring, linux-nvme, linux-block, linux-scsi, fuse-devel,
	joshi.k, anuj20.g

This series adds support for dma-buf registered buffers in NVMe
uring_cmd passthrough.

It depends on this fix:
https://lore.kernel.org/io-uring/20261022132027.2293931-1-anuj1072538@gmail.com/

Patches 1-2 add import flags to the fixed buffer import helpers, so
uring_cmd users have to opt in to dma-buf. Patch 3 adds the io_uring
side, patch 4 lets the block layer map dma-buf iterators for
passthrough, and patch 5 enables it for the NVMe namespace character
device.

Tested with this liburing test:
https://github.com/anuj7781/liburing/tree/rw-dmabuf-pt

Changes since v1:
- split into io_uring, block and nvme patches (Christoph)
- pass import flags to io_import_reg_buf() and
  io_uring_cmd_import_fixed(), and make callers opt in to dma-buf
  (Christoph, Pavel)
- add io_uring_cmd_hw_done(), so nvme no longer handles the dma-buf
  map (Pavel)
- warn if task_work is queued with a dma-buf map attached (Pavel)
- make the -EREMOTEIO conversion explicit and comment it (Christoph)
- refuse dma-bufs larger than 4GiB on the character device

v1: https://lore.kernel.org/linux-nvme/20261016103453.1129150-1-anuj1072538@gmail.com/

Anuj Gupta (5):
  io_uring/rsrc: pass import flags to io_import_reg_buf()
  io_uring/uring_cmd: add import flags to io_uring_cmd_import_fixed()
  io_uring/uring_cmd: support dma-buf registered buffers
  block: map dma-buf iterators in blk_rq_map_user_iov()
  nvme: support dma-buf registered buffers for passthrough

 block/blk-map.c              | 15 ++++++++++++++-
 drivers/nvme/host/core.c     | 16 ++++++++++++++++
 drivers/nvme/host/ioctl.c    |  5 +++--
 drivers/scsi/scsi_bsg.c      |  2 +-
 fs/fuse/dev_uring.c          |  2 +-
 include/linux/io_uring/cmd.h | 14 ++++++++++++--
 io_uring/net.c               |  6 +++---
 io_uring/rsrc.c              |  6 +++---
 io_uring/rsrc.h              | 13 +++----------
 io_uring/rw.c                |  5 +++--
 io_uring/uring_cmd.c         | 31 +++++++++++++++++++++++++++++--
 11 files changed, 88 insertions(+), 27 deletions(-)


base-commit: fd13f31ac62abac4df2166bb0a6fbff53b288e0c
prerequisite-patch-id: 6ad52e1ffc603df71c6855926838f2df402c3ed1
-- 
2.43.0

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

end of thread, other threads:[~2026-10-28 16:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 14:44 [PATCH v2 0/5] dma-buf backed NVMe passthrough I/O Anuj Gupta
2026-10-22 14:44 ` [PATCH v2 1/5] io_uring/rsrc: pass import flags to io_import_reg_buf() Anuj Gupta
2026-10-22 14:44 ` [PATCH v2 2/5] io_uring/uring_cmd: add import flags to io_uring_cmd_import_fixed() Anuj Gupta
2026-10-22 14:44 ` [PATCH v2 3/5] io_uring/uring_cmd: support dma-buf registered buffers Anuj Gupta
2026-10-22 14:44 ` [PATCH v2 4/5] block: map dma-buf iterators in blk_rq_map_user_iov() Anuj Gupta
2026-10-28 16:30   ` Christoph Hellwig
2026-10-22 14:44 ` [PATCH v2 5/5] nvme: support dma-buf registered buffers for passthrough Anuj Gupta
2026-10-28 16:31   ` Christoph Hellwig

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