[PW_SID:1119564] riscv: ptdump: Refactor for KVM gstage ptdump support#2186
[PW_SID:1119564] riscv: ptdump: Refactor for KVM gstage ptdump support#2186linux-riscv-bot wants to merge 3 commits into
Conversation
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. Assisted-by: YuanSheng: deepseek-v4-pro Co-developed-by: Quan Zhou <zhouquan@iscas.ac.cn> Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Signed-off-by: Dylan.Wu <fredwudi0305@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Introduce KVM ptdump to show the guest gstage pagetables. This registers a 'gstage_page_tables' file under the guest debugfs directory. Userspace can now inspect the gstage layout and permissions, which is useful for architectural debugging and memory management audits. Assisted-by: YuanSheng: deepseek-v4-pro Co-developed-by: Quan Zhou <zhouquan@iscas.ac.cn> Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Signed-off-by: Dylan.Wu <fredwudi0305@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
|
Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation" |
a50938c to
40ba5ca
Compare
PR for series 1119564 applied to workflow__riscv__fixes
Name: riscv: ptdump: Refactor for KVM gstage ptdump support
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1119564
Version: 1