From: Jiri Pirko <jiri@resnulli.us>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jacob Moroni <jmoroni@google.com>,
linux-rdma@vger.kernel.org, leon@kernel.org, edwards@nvidia.com,
kees@kernel.org, parav@nvidia.com, mbloch@nvidia.com,
yishaih@nvidia.com, lirongqing@baidu.com,
huangjunxian6@hisilicon.com, liuy22@mails.tsinghua.edu.cn
Subject: Re: [PATCH rdma-next 2/2] RDMA/umem: block plain userspace memory registration under CoCo bounce
Date: Wed, 6 May 2026 11:17:47 +0200 [thread overview]
Message-ID: <afsGma7oz0A8QTuF@FV6GYCPJ69> (raw)
In-Reply-To: <afoUqiDgZmhE4Kog@ziepe.ca>
Tue, May 05, 2026 at 06:02:50PM +0200, jgg@ziepe.ca wrote:
>On Tue, May 05, 2026 at 09:20:01AM -0400, Jacob Moroni wrote:
>> Hi,
>>
>> Out of curiosity, it seems like we set DMA_ATTR_REQUIRE_COHERENT, so
>> would that have caused these registrations to fail anyway since it would
>> be trying to use swiotlb if running in a CVM?
>
>It is supposed to, at least that is the intention. I think that
>new attribute overtook Jiri's patch here?
Yeah, my patch seems to be redundant now.
>
>> I was hoping that the new cc_shared heap could be used without
>> modifying the kernel driver by replacing the normal allocations in the provider
>> with a dmabuf allocation+mmap and just passing the resulting pointer to reg_mr,
>> but that won't work because it's a PFN mapping.
>
>> The driver could be modified to accept the actual dmabuf instead for the QP/CQ
>> rings, but I just wanted to see if that matches your vision here or if
>> you had something
>> else in mind.
>
>Jiri has been looking at both options, but kernel side irdma must be
>upgraded to accept a dmabuf for every kind of userspace memory.
Correct, the transparent dmabuf-backed-VA pinning is still in pipes, as
it is based on https://lore.kernel.org/all/20260504135731.2345383-1-jiri@resnulli.us/
Check it out in my working branch here:
https://github.com/jpirko/linux_mlxsw/commit/00c51b20a977bb63681d140d65d857f978b3b8a6
>
>This is why we have been trying to centralize more of the umem logic
>because every driver should be upgraded to accept dmabuf for
>everything...
>
>> Another idea was to just allocate them in the kernel using the DMA
>> allocator and map them into userspace but it would be a larger change.
>
>This isn't the pattern we are using in rdma..
Yeah, plus I'm missing the motivation, what that would help us to
achieve?
next prev parent reply other threads:[~2026-05-06 9:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 6:11 [PATCH rdma-next 0/2] RDMA: detect and handle CoCo DMA bounce buffering Jiri Pirko
2026-05-05 6:11 ` [PATCH rdma-next 1/2] RDMA/uverbs: expose CoCo DMA bounce requirement to userspace Jiri Pirko
2026-05-05 6:11 ` [PATCH rdma-next 2/2] RDMA/umem: block plain userspace memory registration under CoCo bounce Jiri Pirko
2026-05-05 13:20 ` Jacob Moroni
2026-05-05 16:02 ` Jason Gunthorpe
2026-05-05 18:17 ` Jacob Moroni
2026-05-06 9:20 ` Jiri Pirko
2026-05-06 9:17 ` Jiri Pirko [this message]
2026-05-06 9:25 ` Jiri Pirko
2026-05-06 9:49 ` Jason Gunthorpe
2026-05-06 10:54 ` Jiri Pirko
2026-05-06 13:39 ` Jacob Moroni
2026-05-06 14:54 ` Jiri Pirko
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=afsGma7oz0A8QTuF@FV6GYCPJ69 \
--to=jiri@resnulli.us \
--cc=edwards@nvidia.com \
--cc=huangjunxian6@hisilicon.com \
--cc=jgg@ziepe.ca \
--cc=jmoroni@google.com \
--cc=kees@kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=liuy22@mails.tsinghua.edu.cn \
--cc=mbloch@nvidia.com \
--cc=parav@nvidia.com \
--cc=yishaih@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