From: Zhiping Zhang <zhipingz@meta.com>
To: Alex Williamson <alex@shazbot.org>,
Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Sumit Semwal <sumit.semwal@linaro.org>,
Christian Konig <christian.koenig@amd.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>, <kvm@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, <linux-pci@vger.kernel.org>,
<netdev@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
Keith Busch <kbusch@kernel.org>, Yochai Cohen <yochai@nvidia.com>,
Yishai Hadas <yishaih@nvidia.com>,
Zhiping Zhang <zhipingz@meta.com>
Subject: [PATCH v5 0/4] vfio/dma-buf: add TPH support for peer-to-peer access
Date: Tue, 26 May 2026 07:43:52 -0700 [thread overview]
Message-ID: <20260526144401.1485788-1-zhipingz@meta.com> (raw)
This series adds TLP Processing Hints (TPH) support to the VFIO dma-buf
export path, allowing importing drivers (e.g. mlx5) to use the
exporter's steering tag when performing peer-to-peer DMA into a
VFIO-owned device.
Patch 1 exposes the enabled TPH requester type through a small PCI/TPH
helper so callers don't reach into pci_dev internals.
Patch 2 adds the optional dma_buf_ops::get_tph callback to the dma-buf
framework so importers can fetch TPH metadata from an exporter.
Patch 3 implements get_tph in vfio-pci and adds the new uAPI
(VFIO_DEVICE_FEATURE_DMA_BUF_TPH) for userspace to attach the metadata.
Patch 4 wires up the mlx5 RDMA driver as a consumer.
Previous link:
v4: https://lore.kernel.org/linux-pci/20260519201401.1558410-1-zhipingz@meta.com/
v3: https://lore.kernel.org/linux-pci/20260512184755.4137227-1-zhipingz@meta.com/
v2: https://lore.kernel.org/linux-pci/20260430200704.352228-1-zhipingz@meta.com/
Zhiping Zhang (4):
PCI/TPH: expose the enabled TPH requester type
dma-buf: add optional get_tph() callback
vfio/pci: implement get_tph and DMA_BUF_TPH feature
RDMA/mlx5: get tph for p2p access when registering dma-buf mr
drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 +
drivers/infiniband/hw/mlx5/mr.c | 86 +++++++++++++-
.../net/ethernet/mellanox/mlx5/core/lib/st.c | 28 +++--
drivers/pci/tph.c | 12 ++
drivers/vfio/pci/vfio_pci_core.c | 3 +
drivers/vfio/pci/vfio_pci_dmabuf.c | 110 +++++++++++++++++-
drivers/vfio/pci/vfio_pci_priv.h | 12 ++
include/linux/dma-buf.h | 21 ++++
include/linux/mlx5/driver.h | 7 ++
include/linux/pci-tph.h | 2 +
include/uapi/linux/vfio.h | 37 ++++++
11 files changed, 311 insertions(+), 13 deletions(-)
--
2.53.0-Meta
next reply other threads:[~2026-05-26 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 14:43 Zhiping Zhang [this message]
2026-05-26 14:43 ` [PATCH v5 1/4] PCI/TPH: expose the enabled TPH requester type Zhiping Zhang
2026-05-27 4:35 ` Claude review: " Claude Code Review Bot
2026-05-26 14:43 ` [PATCH v5 2/4] dma-buf: add optional get_tph() callback Zhiping Zhang
2026-05-27 4:35 ` Claude review: " Claude Code Review Bot
2026-05-26 14:43 ` [PATCH v5 3/4] vfio/pci: implement get_tph and DMA_BUF_TPH feature Zhiping Zhang
2026-05-27 4:35 ` Claude review: " Claude Code Review Bot
2026-05-26 14:43 ` [PATCH v5 4/4] RDMA/mlx5: get tph for p2p access when registering dma-buf mr Zhiping Zhang
2026-05-27 4:35 ` Claude review: " Claude Code Review Bot
2026-05-27 4:35 ` Claude review: vfio/dma-buf: add TPH support for peer-to-peer access Claude Code Review Bot
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=20260526144401.1485788-1-zhipingz@meta.com \
--to=zhipingz@meta.com \
--cc=alex@shazbot.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=helgaas@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kbusch@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=leon@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=yishaih@nvidia.com \
--cc=yochai@nvidia.com \
/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