From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Danilo Krummrich" <dakr@kernel.org>
Cc: "John Hubbard" <jhubbard@nvidia.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>, "Gary Guo" <gary@garyguo.net>,
"Simona Vetter" <simona@ffwll.ch>,
"Alistair Popple" <apopple@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, <nova-gpu@lists.linux.dev>,
<dri-devel@lists.freedesktop.org>,
<rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] gpu: nova-core: falcon: use I/O projection to check transfer bounds
Date: Sat, 25 Jul 2026 13:42:00 +0900 [thread overview]
Message-ID: <DK7DKIDW14CO.1PJO3G4OGD4LN@nvidia.com> (raw)
In-Reply-To: <DK75LUA4NLGI.3P29AIZQE20V2@kernel.org>
On Sat Jul 25, 2026 at 7:27 AM JST, Danilo Krummrich wrote:
> On Fri Jul 24, 2026 at 8:10 PM CEST, John Hubbard wrote:
>> Sort of "conceptually pre-existing" problem, but "handle" doesn't
>> quite work as a name, because handles are supposed to be opaque
>> items that one just uses to find and refer to things.
>
> This is inherited from the C API where from its perspective the returned base
> DMA address of the allocation actually serves as a handle.
>
> In Rust the actual handle is represented by different types with different
> invariants and hence capabilties.
>
> (For instance, dma::CoherentBox does not expose the DMA address at all, and
> hence provides access to its contents through a direct mutable reference,
> whereas dma::CoherentHandle only provides access to the DMA address and does not
> have a CPU virtual mapping; dma::Coherent provides access to both.)
>
> Both dma::Coherent and dma::CoherentHandle have a dma_handle() method which
> provides access to the DMA address; this naming was taken over from the C API.
>
> Given that the base DMA address serving as a handle from the perspective of the
> C API is just an implementation detail, we should probably just rename this
> method to dma_address().
I was also thinking about using `dma_address`, so let's do that!
I guess the pieces required to support a proper DMA range type are also
starting to fall together.
prev parent reply other threads:[~2026-07-25 4:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 11:10 [PATCH 0/2] gpu: nova-core: falcon: use I/O projections for DMA transfers Alexandre Courbot
2026-07-24 11:10 ` [PATCH 1/2] gpu: nova-core: falcon: remove unnecessary check Alexandre Courbot
2026-07-24 11:10 ` [PATCH 2/2] gpu: nova-core: falcon: use I/O projection to check transfer bounds Alexandre Courbot
2026-07-24 18:10 ` John Hubbard
2026-07-24 22:27 ` Danilo Krummrich
2026-07-25 4:42 ` Alexandre Courbot [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=DK7DKIDW14CO.1PJO3G4OGD4LN@nvidia.com \
--to=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
--cc=zhiw@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.