From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.72 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796474018; b=hKzGlySwDYV6C4VYdNShQJ30k2lb+pjsWkDmmtZV4TkZVyhw1USj9e0SRHSPoXTRW8JF i9jNcdz55gg2hVw1tgWGEw+3d3FJjAOCUdW1bGUxp561CDRPhUXoBgDr3CVIn6W2z4z5P 7S1AXtuObuT7XNRsftB36cYB5JYu7igtLztbiTZzWU8EiZCkQ2OopzK8jcpnfv2re63k0 2gMjGRlswAgEhBTDW+hHYfXbbtQVRJ8fNnTw8Y/WkZs/R2YxahmK0sOqKLv4795KF88On sLTk2N2gKSP+PEFiZ1ARzcmbMfJ9hLxrmN3gP8/+33/sufyqycvszAjbTNH4rTXWgOQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796474018; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=BkzxFOyuKjvF/LoqMvGkr6W81rXsGkv8WMrxWiju37g=; b=bSbdMh3wxK/7Eh1I8ZGv3TQjhUMdgbyyYaPpy0Obx8uD12s+Oue3y1WJI1xpPAGr6+uA RHTjLQOsd5zDTVQmcofyIf5o2yV160qK12uI7fWiXqRXp4DErIXzW/6E+U8MbiJT3o82x VA6URP1gbRg90FuBWkoI/SD83UTWKYqPPe/SkuXENMOhDgjXnkQMk4lW1aIYKC6tTBpNo K4z44nFRBSn4GNrbP6REUkyZJfzrBu44HVLFT95ayUU+RCfhRh/mqwFRqAWpcJ1VzFV1Y MGhsl+OdTnP4lD09uVmrAMHJeRioawLg+oGRzclNu75a2JQCcGFos0NWnylkeimEAiA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=PaaMfxvf; arc=none smtp.remote-ip=209.85.128.72 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03864606A32F for ; Sat, 5 Dec 2026 12:33:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 03864606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=PaaMfxvf Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4bb8da397aaso14385665e9.0 for ; Sat, 05 Dec 2026 04:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796474016; x=1797078816; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=BkzxFOyuKjvF/LoqMvGkr6W81rXsGkv8WMrxWiju37g=; b=PaaMfxvfdTbhtZ7i9+nzyhSo53qs9a1IV06eMQcgVGsUBLtd1EoMntzFeK9J2QsmPz hdC8YNyeTgQn0Beu0yZfXqNartF7yAltWGUCoEmkrW+DLpi3sTnYP7WJFnooBLwJdtGe LBZ7eKvp8YODL8nN0JLm66FpbxNyDJ3nhu2PIxqMrFKjQCcTiZNNHnZ1n+lPGk74dBN1 /9OC77Zqi8R/gT8WHRtyJSFMPpTUGi4Zk6QGqtzAOcNscXlZxK5TySPfdXTQkUpQw/e8 KmkIvrDEqbIIDLByypBiJ6qbE6NEK0JFQ0rAtorwrzwe+RwGgrUGPObdxv9Uc9lcjMri EulQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796474016; x=1797078816; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=BkzxFOyuKjvF/LoqMvGkr6W81rXsGkv8WMrxWiju37g=; b=Y/wg8/TlF0zgsqGYf0FfmZUEBxHl7HWjXyjAg4SxyDERoNQnUP/r7niHO5UQTNsA5v VWO3esLfZ9289U3eMrW1xueqIku5/xSskVtnim0D4yxddgSWB1ca9zLqunN3CX37gug7 8FBtn7i6ClRSnzr99gJa0k+9oDHTOqpinjkFWBbHUNF0TKGypBKK3w/4Ug8Ntk79c/W1 8q/NRo/WbzEaepXMPFESpAImtNDKOWXdby50kxHhdxs2E5+SdGRlA3Bel5acKQKqfvHl Vu1HtqEznTB1jVtuS0M03VDJNsFFuvmx49+hcC8vw31U42ivzjYl4gkDcDj/tkg0ZQRE QjxQ== X-Forwarded-Encrypted: i=1; AL+hErHF0DfRxVLN17WMpxBi3ZPZh6Qxmh4HRGoB/2DJLLhzmRk/M5G0iPmQP5l6pWkuERVaOdk1QVJA9/jfoBU=@vger.kernel.org X-Gm-Message-State: APuU4Z+Z9zYjsZy+yfHSP0l24rU6PLIoa0zKIOUVNjrI83/oWaFxUd85 KENQyBQ8APJHk5wMsi2+15lQljjw50F8eWWkii3oXxAzlteRf5MXIVm2A+4qyB6rBs9rQfuXjw2 tI67TQOnWREr5MzzwEg== X-Received: from wmbf9.prod.google.com ([2002:a05:600c:5949:b0:4bb:609a:3944]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3ac4:b0:4bb:e68d:786a with SMTP id 5b1f17b1804b1-4bbeb8bb2ebmr101343315e9.14.1796474015899; Sat, 05 Dec 2026 04:33:35 -0800 (PST) Date: Sat, 5 Dec 2026 12:33:34 +0000 In-Reply-To: <20261117-tyr-remap-2mb-v1-0-2a8efd4c8180@google.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261117-tyr-remap-2mb-v1-0-2a8efd4c8180@google.com> X-Mailer: git-send-email 2.56.1.915.g69d5ec7298-goog Message-ID: <20261205123335.312569-1-aliceryhl@google.com> Subject: Re: [PATCH 0/4] drm/tyr: fix partial 2MB block unmaps on GPUVM remap From: Alice Ryhl To: Sami Tolvanen , Daniel Almeida , Deborah Brouwer Cc: Alice Ryhl , Danilo Krummrich , Matthew Brost , "=?UTF-8?q?Thomas=20Hellstr=C3=B6m?=" , Miguel Ojeda , Boqun Feng , Gary Guo , "=?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Tamir Duberstein , Alexandre Courbot , "=?UTF-8?q?Onur=20=C3=96zkan?=" , "Joerg Roedel (AMD)" , Will Deacon , Robin Murphy , Boris Brezillon , dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev Content-Type: text/plain; charset="UTF-8" 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 Applied to drm-rust-next. Thanks! I folded in Danilo's suggestion to rename GpuVa::data_ref() to GpuVa::data() on apply. Alice