From: Anshuman Khandual <anshuman.khandual@arm.com>
To: linux-mm@kvack.org
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Steven Price <steven.price@arm.com>,
Ryan Roberts <ryan.roberts@arm.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Nicholas Piggin <npiggin@gmail.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org
Subject: [PATCH 0/2] mm/ptdump: Drop assumption that pxd_val() is u64
Date: Mon, 17 Mar 2025 11:48:16 +0530 [thread overview]
Message-ID: <20250317061818.16244-1-anshuman.khandual@arm.com> (raw)
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@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Steven Price <steven.price@arm.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-riscv@lists.infradead.org
Cc: linux-s390@vger.kernel.org
Cc: linux-mm@kvack.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
next reply other threads:[~2025-03-17 6:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 6:18 Anshuman Khandual [this message]
2025-03-17 6:18 ` [PATCH 1/2] mm/ptdump: Split note_page() into level specific callbacks Anshuman Khandual
2025-03-21 3:37 ` Anshuman Khandual
2025-03-31 8:59 ` Alexander Gordeev
2025-04-01 2:51 ` Anshuman Khandual
2025-03-17 6:18 ` [PATCH 2/2] arm64/ptdump: Replace u64 with pteval_t Anshuman Khandual
2025-03-17 9:28 ` Ryan Roberts
2025-03-18 4:37 ` Anshuman Khandual
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250317061818.16244-1-anshuman.khandual@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mingo@redhat.com \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=ryan.roberts@arm.com \
--cc=steven.price@arm.com \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox