Re: [PATCH 1/2] riscv: ptdump: Move pagetable definitions to common header
From: Paul Walmsley
Date: Mon Jul 20 2026 - 22:59:07 EST
Hi Dylan,
On Wed, 1 Jul 2026, Dylan.Wu wrote:
> Move the pagetable walking state and level definitions to a new
> arch/riscv/include/asm/ptdump.h header. This allows other parts
> of the kernel (like KVM) to reuse the ptdump attribute parsing
> logic.
>
> To support different pagetable types (like G-stage), the attribute
> parsing logic in dump_prot() is updated to use attribute bits
> defined within the pg_level structure rather than a global array.
Could you please split this into two patches: the first, to create
ptdump.h and move the declarations there and export note_page(); and the
second, to make the attribute parsing and structure changes? That will
make the changes easier to review.
thanks
- Paul