[PATCH 1/2] mm/ptdump: Split note_page() into level specific callbacks
Alexander Gordeev
agordeev at linux.ibm.com
Mon Mar 31 01:59:11 PDT 2025
On Mon, Mar 17, 2025 at 11:48:17AM +0530, Anshuman Khandual wrote:
Hi Anshuman,
...
> --- a/include/linux/ptdump.h
> +++ b/include/linux/ptdump.h
> @@ -11,9 +11,12 @@ struct ptdump_range {
> };
>
> struct ptdump_state {
> - /* level is 0:PGD to 4:PTE, or -1 if unknown */
> - void (*note_page)(struct ptdump_state *st, unsigned long addr,
> - int level, u64 val);
> + void (*note_page_pte)(struct ptdump_state *st, unsigned long addr, pte_t pte);
> + void (*note_page_pmd)(struct ptdump_state *st, unsigned long addr, pmd_t pmd);
> + void (*note_page_pud)(struct ptdump_state *st, unsigned long addr, pud_t pud);
> + void (*note_page_p4d)(struct ptdump_state *st, unsigned long addr, p4d_t p4d);
> + void (*note_page_pgd)(struct ptdump_state *st, unsigned long addr, pgd_t pgd);
> + void (*note_page_flush)(struct ptdump_state *st);
> void (*effective_prot)(struct ptdump_state *st, int level, u64 val);
Should you treat effective_prot() similarly?
> const struct ptdump_range *range;
> };
More information about the linux-arm-kernel
mailing list