From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92A89372EEE; Sun, 23 Aug 2026 10:10:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787479854; cv=none; b=ZO2e5cxP/9z+6jIGYELWJ2QPo35dIjxs0zsdjqazkaSBjQL28IrjKEyDuOLKPMR6DVkocMm7zJ5isPwuEm4HlTAL78TvubIhbkJi2YGuULkE2gr2VzSrpFhRtVRszmMUWlIEWSAtB225eIsajWAZJL+AAAaZiRqbsPoxqhKdKp8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787479854; c=relaxed/simple; bh=HRvVKJ7CZQj22MxQOZMJleCzUmYJJyM4dPbYGIhXboE=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=iC2jUQjN6RFbUlQRrJcYGGFsfQfmMxZrZPRVICuj4lXTIS3F0Twj48iy07FGducQljla0GZOGCVUxWOr1VUh+g077XAxb3l5HXleJO9jWBDRlH1X3CEh1SmdNSpnfyV/iG2QrtGi/V1C+4HgBak5jXiMiy9ONxq9NW0XedpdGLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ScB/ITwx; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ScB/ITwx" 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.