Skip to content

[PW_SID:1119564] riscv: ptdump: Refactor for KVM gstage ptdump support#2186

Closed
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1119564
Closed

[PW_SID:1119564] riscv: ptdump: Refactor for KVM gstage ptdump support#2186
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1119564

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

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

Linux RISC-V bot and others added 3 commits July 1, 2026 03:48
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>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 119.16 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1420.40 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1708.00 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.79 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 23.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.20 seconds
Result: WARNING
Output:

WARNING: Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format
#15: 
Assisted-by: YuanSheng: deepseek-v4-pro

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#27: 
new file mode 100644

total: 0 errors, 2 warnings, 0 checks, 251 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit df7f0077378a ("riscv: ptdump: Move pagetable definitions to common header") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 2 warnings, 0 checks, 251 lines checked
WARNING: Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 79.03 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
kdoc
Desc: Detects for kdoc errors
Duration: 0.72 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
module-param
Desc: Detect module_param changes
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: ptdump: Move pagetable definitions to common header"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 118.84 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1287.81 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1534.94 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 22.43 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 23.63 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.45 seconds
Result: WARNING
Output:

WARNING: Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format
#11: 
Assisted-by: YuanSheng: deepseek-v4-pro

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#73: 
new file mode 100644

CHECK: Consider using #include <linux/pgtable.h> instead of <asm/pgtable.h>
#87: FILE: arch/riscv/kvm/ptdump.c:10:
+#include <asm/pgtable.h>

CHECK: Alignment should match open parenthesis
#190: FILE: arch/riscv/kvm/ptdump.c:113:
+		kvm_ptdump_walk_level(&st->parser_state.ptdump, pgd,
+			start_level, 0);

WARNING: Prefer kzalloc_obj over kzalloc with sizeof
#207: FILE: arch/riscv/kvm/ptdump.c:130:
+	st = kzalloc(sizeof(*st), GFP_KERNEL);

total: 0 errors, 3 warnings, 2 checks, 218 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit b9405bbb0bd4 ("KVM: riscv: Register ptdump with debugfs on guest creation") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 3 warnings, 2 checks, 218 lines checked
CHECK: Alignment should match open parenthesis
CHECK: Consider using #include <linux/pgtable.h> instead of <asm/pgtable.h>
WARNING: Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format
WARNING: Prefer kzalloc_obj over kzalloc with sizeof
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 79.64 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
kdoc
Desc: Detects for kdoc errors
Duration: 0.75 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] KVM: riscv: Register ptdump with debugfs on guest creation"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch 3 times, most recently from a50938c to 40ba5ca Compare July 8, 2026 17:32
@linux-riscv-bot
linux-riscv-bot deleted the pw1119564 branch July 9, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants