Re: [PATCH 0/4] drm/tyr: fix partial 2MB block unmaps on GPUVM remap
From: Alice Ryhl
Date: Sat Dec 05 2026 - 07:33:43 EST
On Tue, 17 Nov 2026 19:32:17 +0000, Alice Ryhl wrote:
> Tyr configures its ARM64 LPAE page tables with 4KB and 2MB block sizes,
> but arm-lpae rejects unmapping part of a 2MB block. As a result, a
> partial unmap or overlapping remap that splits a 2MB block in
> GpuVmData::sm_step_remap() fails in __arm_lpae_unmap().
>
> This series ports the remap fix and supporting accessors from tyr-dev
> onto drm-rust-next, along with a defensive bounds check in pt_unmap():
>
> 1. Add the GpuVa::data_ref() accessor.
> 2. Add the IoPageTable::iova_to_phys() accessor.
> 3. Expand sub-block unmaps in sm_step_remap() to 2MB boundaries when
> the swept head/tail fragment is physically contiguous, widen the AS
> lock over the expanded range, rebuild the surviving fragments, and
> take the preallocated GPUVAs before mutating page tables.
> 4. Check the remaining-length subtraction in pt_unmap() against
> underflow.
>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Applied to drm-rust-next. Thanks!
I folded in Danilo's suggestion to rename GpuVa::data_ref() to GpuVa::data() on apply.
Alice