]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: iommu: add io_pgtable abstraction
authorAsahi Lina <lina+kernel@asahilina.net>
Sun, 18 Jan 2026 10:08:08 +0000 (10:08 +0000)
committerJoerg Roedel <joerg.roedel@amd.com>
Mon, 19 Jan 2026 09:28:31 +0000 (10:28 +0100)
commit2e2f6b0ef8551bf3bd8255729d27e3ad9451e562
treed2ce237c30d3ca7cc8c054705ef8e42534f896cd
parente2692c4eeaa4bd945b7bae156b4cac55d6a0c730
rust: iommu: add io_pgtable abstraction

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@asahilina.net>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Tested-by: Deborah Brouwer <deborah.brouwer@collabora.com>
Co-developed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
[joro: Fixed up Rust import style]
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
MAINTAINERS
rust/bindings/bindings_helper.h
rust/kernel/iommu/mod.rs [new file with mode: 0644]
rust/kernel/iommu/pgtable.rs [new file with mode: 0644]
rust/kernel/lib.rs