From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DE6A606A321 for ; Tue, 24 Nov 2026 20:40:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=CLODot0P; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OPqInZwC DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=hMuj+ug/fxhLYLNO1oE/KBX7iI12GhDtXeAuAVnleAA=; b=CLODot0PJfOSedzVJsIk8lEbL8 Yh4LOzzdcB2xZc6A+8noySSAyP8K7OidvBgAsoTMZdRZjpRgCzIBO8Ipxauey+bvznyVioj1szkQI GptfNTtqX7z5Stww8eKI5Tr/wBA2nMn32obKqFA+vuQ8BswhGcQRMe4s7uOxk8IL1JOEWum0zIo2N 4Nqpr7sEbFwIaEewLyeeeedpVSR1enmDy+x/S/3OGNq5ZjKJsGkXYhgHVq4Q4h3oVSEbo/Exf1hIM U2d8wkitPZr/x5nhXFNwl2Ngow+E9LwuhNCydGERqBSC5qSL6JNOE68x0BGKOmP412Dgtd2blbQ69 jv4N45VA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xVxJF-00000007jzI-1KOs; Tue, 24 Nov 2026 20:40:13 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xVxJE-00000007jzA-1yym for linux-arm-kernel@lists.infradead.org; Tue, 24 Nov 2026 20:40:12 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 3DC23447DE; Tue, 24 Nov 2026 20:40:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05C1B1F000F2; Tue, 24 Nov 2026 20:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795552812; bh=hMuj+ug/fxhLYLNO1oE/KBX7iI12GhDtXeAuAVnleAA=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=OPqInZwC/CqupG7koI9mIkLSCBw89eRaMnjN1qL3mwg/+B3u+oaz/UTO4NxO8ny8G OYTSd/hkpotETzpHt6A/FopAza4LQpZQRcdYzmeYL5AFwnX/fgM+HUs5hmCLIxxMxg tLZHc3la9K4OZr0eqnkmyyxz45TeCU6FxdieV0aqbYyXDMGBZsxEDy3jCgLwLBhv8J OAcpZbqbAkJX10huAvRtnT0geFvThdyJmkjA2MRVr5ljdZ8ZyJVQpJUDiXt/uinv+e lxECIdfxWLkiiTbwyN0crS5I3Gd3S0S1tz/0IjnfLyLEldWFL+zSScuyaL5jg3/Lrc ZWgNvvAgQm7dQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=lobster-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xVxJB-00000002mQ4-47zv; Tue, 24 Nov 2026 20:40:10 +0000 Date: Tue, 24 Nov 2026 20:42:19 +0000 Message-ID: <87a4my7yhg.wl-maz@kernel.org> From: Marc Zyngier To: Colton Lewis Cc: Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Fuad Tabba , Steffen Eiden , Catalin Marinas , Will Deacon , Mark Rutland , Wei-Lin Chang , Dan Carpenter , kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] KVM: arm64: nv: Discard undersized TTL hints in compute_tlb_inval_range() In-Reply-To: <20261124202215.3731849-1-coltonlewis@google.com> References: <20261123232647.3733149-1-coltonlewis@google.com> <20261123232647.3733149-2-coltonlewis@google.com> <867bi2z87n.wl-maz@kernel.org> <20261124202215.3731849-1-coltonlewis@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-Archived-By: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: coltonlewis@google.com, oupton@kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, fuad.tabba@linux.dev, seiden@linux.ibm.com, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, weilin.chang@arm.com, dan@pereq.eu, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, 24 Nov 2026 20:22:15 +0000, Colton Lewis wrote: > > On Tue, 24 Nov 2026 13:10:04 +0000, Marc Zyngier wrote: > > What's the advantage doing all this dance over the patch proposed at > > [1]? > > > > M. > > > > [1] https://lore.kernel.org/all/20261123182312.4842-1-maz@kernel.org/ > > [1] only catches TTL hints smaller than host PAGE_SIZE. It does not > catch a hint that is >= PAGE_SIZE but smaller than the mapped block, > such as a 4kB L3 hint on a 2MB block on a 4kB host. Why do you think this makes *any* difference? The hint passed by the guest is utter bollocks, and the best thing would be to not invalidate anything. It's just too invasive to do elegantly. > I can rebase on top of [1] so it goes to stable on its own. Following > the same pattern, compute_tlb_inval_range() can check > mmu->guest_s2_mappings at addr for an entry larger than max_size and > clear it to 0 to use the maximum-extent fallback, dropping the extra > page-table walk and KVM_NV_GUEST_MAP_SZ check. Would that work for v3? No, I don't want it at all, unless you can prove that this there is something architecturally incorrect in what I'm proposing. M. -- Jazz isn't dead. It just smells funny.