Re: [PATCH v5] io: add io_pgtable abstraction
From: Deborah Brouwer
Date: Tue Jan 13 2026 - 16:51:21 EST
On Tue, Jan 13, 2026 at 08:49:27AM +0000, Alice Ryhl wrote:
> From: Asahi Lina <lina+kernel@xxxxxxxxxxxxx>
>
> This will be used by the Tyr driver to create and modify the page table
> of each address space on the GPU. Each time a mapping gets created or
> removed by userspace, Tyr will call into GPUVM, which will figure out
> which calls to map_pages and unmap_pages are required to map the data in
> question in the page table so that the GPU may access those pages when
> using that address space.
>
> The Rust type wraps the struct using a raw pointer rather than the usual
> Opaque+ARef approach because Opaque+ARef requires the target type to be
> refcounted.
>
> Signed-off-by: Asahi Lina <lina+kernel@xxxxxxxxxxxxx>
> Acked-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
> Reviewed-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
> Co-developed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> ---
>
As part of the wip for booting Tyr firmware, I have been using this
io_pgtable abstraction including v5.
Built and tested on arm64 with rustc 1.91.0 and bindgen 0.72.1.
Tested-by: Deborah Brouwer <deborah.brouwer@xxxxxxxxxxxxx>