From: Alice Ryhl <aliceryhl@google.com>
To: Deborah Brouwer <deborah.brouwer@collabora.com>
Cc: Daniel Almeida <daniel.almeida@collabora.com>,
Danilo Krummrich <dakr@kernel.org>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>, Benno Lossin <lossin@kernel.org>,
Gary Guo <gary@garyguo.net>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org, boris.brezillon@collabora.com,
samitolvanen@google.com, acourbot@nvidia.com,
alvin.sun@linux.dev, laura.nao@collabora.com,
work@onurozkan.dev, beata.michalska@arm.com,
steven.price@arm.com, lyude@redhat.com
Subject: Re: [PATCH v6 4/7] drm/tyr: add GPU virtual memory (VM) support
Date: Fri, 10 Jul 2026 14:27:42 +0000 [thread overview]
Message-ID: <alEBXhTk2th3aENc@google.com> (raw)
In-Reply-To: <20260709-fw-boot-b4-v6-4-ca391e1a4108@collabora.com>
On Thu, Jul 09, 2026 at 02:36:44PM -0700, Deborah Brouwer wrote:
> From: Boris Brezillon <boris.brezillon@collabora.com>
>
> Add GPU virtual address space management using the DRM GPUVM framework.
> Each virtual memory (VM) space is backed by ARM64 LPAE Stage 1 page tables
> and can be mapped into hardware address space (AS) slots for GPU execution.
>
> The implementation provides memory isolation and virtual address
> allocation. VMs support mapping GEM buffer objects with configurable
> protection flags (readonly, noexec, uncached) and handle both 4KB and 2MB
> page sizes. A new_dummy_object() helper is provided to create a dummy GEM
> object for use as a GPUVM root.
>
> The vm module integrates with the MMU for address space activation and
> provides map/unmap/remap operations with page table synchronization.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Co-developed-by: Daniel Almeida <daniel.almeida@collabora.com>
> Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
> Co-developed-by: Deborah Brouwer <deborah.brouwer@collabora.com>
> Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
I'm seeing some build failures on 32-bit arm:
error[E0308]: mismatched types
--> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:572:45
|
572 | let mut sgt_entry_length: u64 = sgt_entry.dma_len();
| --- ^^^^^^^^^^^^^^^^^^^ expected `u64`, found `u32`
| |
| expected due to this
|
help: you can convert a `u32` to a `u64`
|
572 | let mut sgt_entry_length: u64 = sgt_entry.dma_len().into();
| +++++++
error[E0308]: mismatched types
--> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:581:26
|
581 | paddr += skip;
| ^^^^ expected `u32`, found `u64`
error[E0277]: cannot add-assign `u64` to `u32`
--> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:581:23
|
581 | paddr += skip;
| ^^ no implementation for `u32 += u64`
|
= help: the trait `core::ops::AddAssign<u64>` is not implemented for `u32`
help: `u32` implements trait `core::ops::AddAssign<Rhs>`
--> /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/internal_macros.rs:61:9
|
61 | impl const $imp<&$u> for $t {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `core::ops::AddAssign<&u32>`
|
::: /home/runner/work/linux/linux/linux/rust/zerocopy/src/byteorder.rs:316:9
|
316 | impl<O: ByteOrder> core::ops::$trait_assign<$name<O>> for $native {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `core::ops::AddAssign<zerocopy::byteorder::U32<O>>`
...
720 | / define_type!(
721 | | A,
722 | | "A 32-bit unsigned integer",
723 | | U32,
... |
735 | | [U64, U128]
736 | | );
| |_- in this macro invocation
|
::: /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/arith.rs:786:9
|
786 | impl const AddAssign for $t {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `core::ops::AddAssign`
CC drivers/base/firmware_loader/builtin/main.o
...
799 | add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f16 f32 f64 f128 }
| ----------------------------------------------------------------------------------------- in this macro invocation
= note: this error originates in the macro `impl_ops_traits` which comes from the expansion of the macro `add_assign_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:596:65
|
596 | let segment_mapped = match pt_map(context.pt, iova, paddr, len, prot) {
| ------ ^^^^^ expected `u64`, found `u32`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:731:4
|
731 | fn pt_map(
| ^^^^^^
...
734 | paddr: u64,
| ----------
help: you can convert a `u32` to a `u64`
|
596 | let segment_mapped = match pt_map(context.pt, iova, paddr.into(), len, prot) {
| +++++++
CC net/core/tso.o
error: aborting due to 4 previous errors
next prev parent reply other threads:[~2026-07-10 14:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 21:36 [PATCH v6 0/7] drm/tyr: firmware loading and MCU boot support Deborah Brouwer
2026-07-09 21:36 ` [PATCH v6 1/7] drm/tyr: add resources to RegistrationData Deborah Brouwer
2026-07-09 21:36 ` [PATCH v6 2/7] drm/tyr: add a generic slot manager Deborah Brouwer
2026-07-10 13:23 ` Alice Ryhl
2026-07-09 21:36 ` [PATCH v6 3/7] drm/tyr: add Memory Management Unit (MMU) support Deborah Brouwer
2026-07-10 13:45 ` Alice Ryhl
2026-07-09 21:36 ` [PATCH v6 4/7] drm/tyr: add GPU virtual memory (VM) support Deborah Brouwer
2026-07-10 14:15 ` Alice Ryhl
2026-07-10 14:27 ` Alice Ryhl [this message]
2026-07-09 21:36 ` [PATCH v6 5/7] drm/tyr: add a kernel buffer object Deborah Brouwer
2026-07-09 21:36 ` [PATCH v6 6/7] drm/tyr: add parser for firmware binary Deborah Brouwer
2026-07-09 21:36 ` [PATCH v6 7/7] drm/tyr: add Microcontroller Unit (MCU) booting Deborah Brouwer
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=alEBXhTk2th3aENc@google.com \
--to=aliceryhl@google.com \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=alvin.sun@linux.dev \
--cc=beata.michalska@arm.com \
--cc=boris.brezillon@collabora.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=deborah.brouwer@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=laura.nao@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=work@onurozkan.dev \
/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