[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250317061818.16244-1-anshuman.khandual@arm.com>
Date: Mon, 17 Mar 2025 11:48:16 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: linux-mm@...ck.org
Cc: Anshuman Khandual <anshuman.khandual@....com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Steven Price <steven.price@....com>,
Ryan Roberts <ryan.roberts@....com>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Nicholas Piggin <npiggin@...il.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org
Subject: [PATCH 0/2] mm/ptdump: Drop assumption that pxd_val() is u64
Last argument passed down in note_page() is u64 assuming pxd_val() returned
value (all page table levels) is 64 bit - which might not be the case going
ahead when D128 page tables is enabled on arm64 platform. Besides pxd_val()
is very platform specific and its type should not be assumed in generic MM.
This series splits note_page() into individual page table level specific
callbacks which accepts corresponding pxd_t page table entry as an argument
instead and later all subscribing platforms could derive pxd_val() from the
entries as required and proceed as before.
Page table entry's value, mask and protection are represented with pteval_t
not u64 that has been assumed while dumping the page table entries on arm64
platform. Replace such u64 instances with pteval_t instead as expected.
This series has been tested on arm64 platform but it does build on other
relevant platforms (v6.14-rc7).
Changes in V1:
- Added note_page_flush() callback and implemented the same on all
subscribing platforms
- Moved note_page() argument change from u64 to pteval_t on arm64 platform
from second patch to the first patch instead
Changes in RFC:
https://lore.kernel.org/all/20250310095902.390664-1-anshuman.khandual@arm.com/
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Will Deacon <will@...nel.org>
Cc: Steven Price <steven.price@....com>
Cc: Ryan Roberts <ryan.roberts@....com>
Cc: Madhavan Srinivasan <maddy@...ux.ibm.com>
Cc: Nicholas Piggin <npiggin@...il.com>
Cc: Paul Walmsley <paul.walmsley@...ive.com>
Cc: Palmer Dabbelt <palmer@...belt.com>
Cc: Gerald Schaefer <gerald.schaefer@...ux.ibm.com>
Cc: Heiko Carstens <hca@...ux.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org
Cc: linuxppc-dev@...ts.ozlabs.org
Cc: linux-riscv@...ts.infradead.org
Cc: linux-s390@...r.kernel.org
Cc: linux-mm@...ck.org
Anshuman Khandual (2):
mm/ptdump: Split note_page() into level specific callbacks
arm64/ptdump: Replace u64 with pteval_t
arch/arm64/include/asm/ptdump.h | 24 ++++++++++++----
arch/arm64/mm/ptdump.c | 50 ++++++++++++++++++++++++++++++---
arch/powerpc/mm/ptdump/ptdump.c | 46 ++++++++++++++++++++++++++++--
arch/riscv/mm/ptdump.c | 46 ++++++++++++++++++++++++++++--
arch/s390/mm/dump_pagetables.c | 46 ++++++++++++++++++++++++++++--
arch/x86/mm/dump_pagetables.c | 39 ++++++++++++++++++++++++-
include/linux/ptdump.h | 9 ++++--
mm/ptdump.c | 42 ++++++++++++++++++++-------
8 files changed, 272 insertions(+), 30 deletions(-)
--
2.25.1
Powered by blists - more mailing lists