From: Deborah Brouwer <deborah.brouwer@collabora.com>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Daniel Almeida" <daniel.almeida@collabora.com>,
"Sami Tolvanen" <samitolvanen@google.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Matthew Brost" <matthew.brost@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
"Will Deacon" <will@kernel.org>,
"Robin Murphy" <robin.murphy@arm.com>,
"Boris Brezillon" <boris.brezillon@collabora.com>,
dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org, iommu@lists.linux.dev
Subject: Re: [PATCH 0/4] drm/tyr: fix partial 2MB block unmaps on GPUVM remap
Date: Tue, 17 Nov 2026 20:40:27 -0700 [thread overview]
Message-ID: <av0eKyWMqDWy1wHo@um790> (raw)
In-Reply-To: <20261117-tyr-remap-2mb-v1-0-2a8efd4c8180@google.com>
On Tue, Nov 17, 2026 at 07:32:17PM +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.
Thank you for this series. I tested it on my Rock5B with the latest Tyr ioctl
series [1] and I can no longer trigger the unmap WARNING
"Unmap of a partial large IOPTE is not allowed".
So, for the whole series:
Tested-by: Deborah Brouwer <deborah.brouwer@collabora.com>
[1] https://lore.kernel.org/rust-for-linux/20261109-tyr-ioctls-v6-0-b2896bf2b3c9@kylinos.cn/
>
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
> Sami Tolvanen (4):
> rust: drm/gpuvm: add GpuVa::data_ref accessor
> rust: iommu: pgtable: add iova_to_phys
> drm/tyr: vm: expand sub-block unmaps to 2MB boundaries on remap
> drm/tyr: vm: check the remaining length in pt_unmap()
>
> drivers/gpu/drm/tyr/mmu.rs | 13 +++
> drivers/gpu/drm/tyr/mmu/address_space.rs | 29 ++++++
> drivers/gpu/drm/tyr/vm.rs | 152 ++++++++++++++++++++++++++++---
> rust/kernel/drm/gpuvm/va.rs | 6 ++
> rust/kernel/iommu/pgtable.rs | 23 +++++
> 5 files changed, 209 insertions(+), 14 deletions(-)
> ---
> base-commit: 8045d0e7d208ad389a387f1407ce0db9070805af
> change-id: 20261116-tyr-remap-2mb-7a53b8475cfc
>
> Best regards,
> --
> Alice Ryhl <aliceryhl@google.com>
>
prev parent reply other threads:[~2026-11-18 3:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 19:32 [PATCH 0/4] drm/tyr: fix partial 2MB block unmaps on GPUVM remap Alice Ryhl
2026-11-17 19:32 ` [PATCH 1/4] rust: drm/gpuvm: add GpuVa::data_ref accessor Alice Ryhl
2026-11-17 19:40 ` Danilo Krummrich
2026-11-17 19:32 ` [PATCH 2/4] rust: iommu: pgtable: add iova_to_phys Alice Ryhl
2026-11-17 19:32 ` [PATCH 3/4] drm/tyr: vm: expand sub-block unmaps to 2MB boundaries on remap Alice Ryhl
2026-11-17 19:32 ` [PATCH 4/4] drm/tyr: vm: check the remaining length in pt_unmap() Alice Ryhl
2026-11-18 3:40 ` Deborah Brouwer [this message]
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=av0eKyWMqDWy1wHo@um790 \
--to=deborah.brouwer@collabora.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=boris.brezillon@collabora.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=matthew.brost@intel.com \
--cc=ojeda@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=tamird@kernel.org \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tmgross@umich.edu \
--cc=will@kernel.org \
--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