]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - arch/riscv/mm/ptdump.c
riscv: Add support to dump the kernel page tables
authorZong Li <zong.li@sifive.com>
Thu, 12 Mar 2020 02:58:35 +0000 (10:58 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 26 Mar 2020 16:29:49 +0000 (09:29 -0700)
commit59c4da8640ccf4721d54d36835706f3eefb521a4
tree598f0449ad9a5643de09202de7b9268f72e33f55
parent8fdddb2eae731dd6beb89f9b812e5915d1beb744
riscv: Add support to dump the kernel page tables

In a similar manner to arm64, x86, powerpc, etc., it can traverse all
page tables, and dump the page table layout with the memory types and
permissions.

Add a debugfs file at /sys/kernel/debug/kernel_page_tables to export
the page table layout to userspace.

Signed-off-by: Zong Li <zong.li@sifive.com>
Tested-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig
arch/riscv/include/asm/pgtable.h
arch/riscv/include/asm/ptdump.h [new file with mode: 0644]
arch/riscv/mm/Makefile
arch/riscv/mm/ptdump.c [new file with mode: 0644]