Re: [PATCH v10 4/7] drm/tyr: add GPU virtual memory (VM) support

Alice Ryhl <[email protected]>
Newsgroups org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <CAH5fLgjDoWT09Kdp0Jtg=XtmWVdnUM71yT_TsQG+TX1RJ6GqaQ@mail.gmail.com>
On Tue, Jul 28, 2026 at 8:39 PM Deborah Brouwer
<[email protected]> wrote:
>
> From: Boris Brezillon <[email protected]>
>
> 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 <[email protected]>
> Co-developed-by: Daniel Almeida <[email protected]>
> Signed-off-by: Daniel Almeida <[email protected]>
> Co-developed-by: Deborah Brouwer <[email protected]>
> Signed-off-by: Deborah Brouwer <[email protected]>

There's a 32-bit build failure :(

error[E0308]: mismatched types
   --> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:873:17
    |
871 |             pt.map_pages(
    |                --------- arguments to this method are incorrect
872 |                 curr_iova,
873 |                 curr_paddr,
    |                 ^^^^^^^^^^ expected `u32`, found `u64`
    |
note: method defined here
   --> /home/runner/work/linux/linux/linux/rust/kernel/iommu/pgtable.rs:152:19
    |
152 |     pub unsafe fn map_pages(
    |                   ^^^^^^^^^
help: you can convert a `u64` to a `u32` and panic if the converted
value doesn't fit
    |
873 |                 curr_paddr.try_into().unwrap(),
    |                           ++++++++++++++++++++
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.