From: Leon Romanovsky <leon@kernel.org>
To: Zhiping Zhang <zhipingz@meta.com>
Cc: Alex Williamson <alex@shazbot.org>,
Jason Gunthorpe <jgg@ziepe.ca>,
Michael Guralnik <michaelgur@nvidia.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
Christian Konig <christian.koenig@amd.com>,
Bjorn Helgaas <bhelgaas@google.com>,
kvm@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v11 0/4] vfio/dma-buf: add TPH support for peer-to-peer access
Date: Mon, 13 Jul 2026 11:04:39 +0300 [thread overview]
Message-ID: <20260713080439.GH33197@unreal> (raw)
In-Reply-To: <CAH3zFs3OwPyTrWk7oaMYETq7sBEQ7VRfDtzWWamhiE3AJzVShw@mail.gmail.com>
On Fri, Jul 10, 2026 at 02:13:31PM -0700, Zhiping Zhang wrote:
> On Thu, Jul 9, 2026 at 12:26 PM Alex Williamson <alex@shazbot.org> wrote:
> >
> > >
> > On Thu, 2 Jul 2026 11:10:13 -0700
> > Zhiping Zhang <zhipingz@meta.com> wrote:
> >
> > > Changes since v10:
> > > Patch 2 (dma-buf): Per Christian König, document that the ST/PH
> > > returned by dma_buf_get_pci_tph() is only valid until the exporter
> > > invalidates the current mapping and must be re-queried afterwards;
> > > note added to the wrapper kernel-doc and referenced from the callback
> > > kernel-doc. Also add dma_buf_get_pci_tph() and dma_buf_ops.get_pci_tph()
> > > to the central dma-buf locking convention.
> > >
> > > Patch 3 (vfio/pci): Per Alex Williamson, update the vfio_pci_dma_buf
> > > comment to note that @revoked is additionally protected by memory_lock,
> > > and describe the READ_ONCE() rationale in the commit log. No behavior
> > > change.
> >
> > Sashiko has valid comments[1] across most of the series.
> >
> > - Passing through 0b10 seems mis-categorized as High in patch 1, but
> > is valid hardening if tph_req_type can ever hold an invalid value.
> >
>
> agreed, not High and pre-existing: get_rp_completer_type() is from the
> original TPH
> support and untouched here. I can send the hardening change in a separate patch.
>
> > - The documentation error in patch 2 is real.
> >
>
> will fix!
>
> > - Patch 4 ironically fails to re-validate according to the lifecycle
> > requirements that patch 2 specifies. This is a significant gap in
> > the implementation proof for a real requester.
> >
>
> Got it, I'll re-query ma_buf_get_pci_tph() there and reprogram the
> mkey's steering tag,
> so the lifecycle is honored.
>
> > - The broadened scope of the existing memory leak in patch 4 is
> > already addressed in [2], ok. Maybe should be folded into this
> > series if mlx5 isn't going to pick it up separately.
> >
>
> [2] is already accepted and landing through the mlx5/RDMA tree.
It is not; the patch is intended for net and has still not been
accepted.
https://lore.kernel.org/linux-rdma/20260702222507.1234467-1-zhipingz@meta.com/
Thanks
>
> I plan to keep it as a standalone dependency.
>
> > Thanks,
> > Alex
> >
> > [1]https://urldefense.com/v3/__https://sashiko.dev/*/patchset/20260702181025.2694961-1-zhipingz@meta.com__;Iw!!Bt8RZUm9aw!5x8TPHfbpTXQJ872nmZaHsPIXH7HsL9ICbZR3G37yKkHgB-RukCDOy3XiLIOhfhP-yTczTyWQmud$
> > [2]https://lore.kernel.org/linux-rdma/20260612170406.3339093-1-zhipingz@meta.com
>
> Thanks,
> Zhiping
prev parent reply other threads:[~2026-07-13 8:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 18:10 [PATCH v11 0/4] vfio/dma-buf: add TPH support for peer-to-peer access Zhiping Zhang
2026-07-02 18:10 ` [PATCH v11 1/4] PCI/TPH: Add requester/completer type helpers Zhiping Zhang
2026-07-02 18:33 ` sashiko-bot
2026-07-02 18:10 ` [PATCH v11 2/4] dma-buf: add optional get_pci_tph() callback Zhiping Zhang
2026-07-02 18:33 ` sashiko-bot
2026-07-02 18:10 ` [PATCH v11 3/4] vfio/pci: implement get_pci_tph and DMA_BUF_TPH feature Zhiping Zhang
2026-07-02 18:29 ` sashiko-bot
2026-07-03 4:13 ` fengchengwen
2026-07-03 6:57 ` Zhiping Zhang
2026-07-02 18:10 ` [PATCH v11 4/4] RDMA/mlx5: get tph for p2p access when registering dma-buf mr Zhiping Zhang
2026-07-02 18:42 ` sashiko-bot
2026-07-08 5:39 ` Michael Gur
2026-07-09 19:26 ` [PATCH v11 0/4] vfio/dma-buf: add TPH support for peer-to-peer access Alex Williamson
2026-07-10 21:13 ` Zhiping Zhang
2026-07-13 8:04 ` Leon Romanovsky [this message]
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=20260713080439.GH33197@unreal \
--to=leon@kernel.org \
--cc=alex@shazbot.org \
--cc=bhelgaas@google.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jgg@ziepe.ca \
--cc=kvm@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=michaelgur@nvidia.com \
--cc=sumit.semwal@linaro.org \
--cc=zhipingz@meta.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