From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35AEEC5DF8C for ; Sun, 23 Aug 2026 10:11:04 +0000 (UTC) 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-Owner; bh=exiQu/n7a35eCwkPUfkUf1Yr2art4np6KjKYg+xxX4s=; b=YtqILdJ+Zqny4FFAD+9TrioOWS bOH0wcOOmhmDFVnhjkx+D0RHTzdK6Unn9obEDw0IHVCYLNv94eJj1/Xo2aKv+0N3muwJQOatx4Zb4 31k62huBAMOnS6NdUiC0bm7YbBfLfuSXwl5f1pnn05j8R2yfLfiylxc+UlABkg7+uOLNffmVb1rgL IghK/nKNGeqzOfVqhMbxwtp25yNauEaJaVEs4yZX2eKmLXzeQYSsf1ouuRaFFfnsEaFHA8ZE2aLLY reHtMlO/NfxjJyfQLGwy7O2/DvNXxObDZXEQ6BaZ3pTURFuLi4MwxC3aMi7ARR6/oj7BgBpPBDZ/y sIeboS2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wy5AB-0000000FEho-14uC; Sun, 23 Aug 2026 10:10:51 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wy5A7-0000000FEhg-1fMl for linux-arm-kernel@lists.infradead.org; Sun, 23 Aug 2026 10:10:50 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 472EB60052; Sun, 23 Aug 2026 10:10:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D74CA1F000E9; Sun, 23 Aug 2026 10:10:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787479845; bh=exiQu/n7a35eCwkPUfkUf1Yr2art4np6KjKYg+xxX4s=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=ScB/ITwx9MAGtoO1/gup7gxttaecBHwOpwRZf5zXmDnDFpsvMdxiSdxD6mv0DZlUn QPZvQ7R/UG3oyNJowVOx/fCqjmlvjIXn20t4p3aPaLENhn8aoYFNwUQgNZEeZLvplu pbR+NZIs0avcYCyJ68lUIzPfb4MV501M25jZ11Y/2ThVztvbmGZHuSqARSRVxppRj0 tGAr23kxoljNtXQMbbbUv4JROP0xX4o+7MXCuwbBsZGjZdLyMbftTDsl/2j4FayCcv +WLd2rECSZKFgCssuY389oRLDuK8wvlEzn1/2skftMM6wBJKDGbiUndjNQit907VQG OiQLEYu7Wzv6g== 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 1wy5A3-00000000Oc2-1TO6; Sun, 23 Aug 2026 10:10:43 +0000 Date: Sun, 23 Aug 2026 11:13:15 +0100 Message-ID: <87h5klno04.wl-maz@kernel.org> From: Marc Zyngier To: Will Deacon , Wei-Lin Chang Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, Catalin Marinas , Oliver Upton , Fuad Tabba , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , "Mike Rapoport (Microsoft)" , Ryan Roberts , "David Hildenbrand (Arm)" , Anshuman Khandual , Dev Jain , Ard Biesheuvel , Mark Rutland , Matt Fleming , Vincent Donnefort , Sebastian Ene Subject: Re: [PATCH v3 0/2] arm64: ptdump flush fixes In-Reply-To: <20260814222458.584906-1-weilin.chang@arm.com> References: <20260814222458.584906-1-weilin.chang@arm.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) 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: will@kernel.org, weilin.chang@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, catalin.marinas@arm.com, oupton@kernel.org, tabba@google.com, joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, rppt@kernel.org, ryan.roberts@arm.com, david@kernel.org, anshuman.khandual@arm.com, dev.jain@arm.com, ardb@kernel.org, mark.rutland@arm.com, matt@codeblueprint.co.uk, vdonnefort@google.com, sebastianene@google.com 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 14 Aug 2026 23:24:56 +0100, Wei-Lin Chang wrote: > > Hi, > > This series fixes two problems around ptdumps: > > 1. note_page_flush(), which flushes out the last row of ptdumps, does > not account for address spaces that have IA < 64. Other than making > the last region extremely huge, the attributes of the last region > within the address spaces appear to extend all the way to 1 << 64. > > 2. KVM/arm64's stage-2 ptdump missed calling note_page_flush(). > > To address Will's comment [1], I have created an end_address field for > struct ptdump_pg_state, and initialized it with the end address of the > ptdumps. It follows the same convention as the last range->end: > exclusive end, except for the case where the address space ends at > 1 << 64. In that case it is set as ULONG_MAX. > > Caching the end address avoids duplicating the range iteration in > note_page_flush(), at the cost of duplicating state in ptdump_pg_state. > > Series is based on v7.2-rc5. Reviewed-by: Marc Zyngier Will, if you're OK with patch #1, do you want the whole thing to go via the arm64 or the kvmarm tree? Thanks, M. -- Jazz isn't dead. It just smells funny.