Skip to content

Conversation

@cp0613
Copy link
Contributor

@cp0613 cp0613 commented Jan 29, 2026

commit: https://lore.kernel.org/all/20230921025022.3989723-1-peterlin@andestech.com/

This patchset enhances PTDUMP by providing additional information from pagetable entries.

The first patch fixes the RSW field, while the second and third patches introduce the PBMT and NAPOT fields, respectively, for RV64 systems.

@github-actions
Copy link

github-actions bot commented Jan 29, 2026


开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/21475412754

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/206/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA Template lava-job-template/qemu/qemu-ltp.yaml
Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:

RVCK result

check result
kunit-test success
kernel-build success
lava-trigger success
check-patch success

Kunit Test Result

[10:59:38] Testing complete. Ran 455 tests: passed: 443, skipped: 12

Kernel Build Result

Kernel build succeeded: RVCK-Project/rvck/206/

1094c0f03e09063014d6c3c26584d0a9 /srv/guix_result/6e8f0bd204ef49f05aa224a769612ea171d63c39/Image
201d63c67233004b57dd5aa9daf9aa83 /root/initramfs.img

LAVA Check

args:

result:

Lava check done! lava log: https://lava.oerv.ac.cn/scheduler/job/1234

lava result count: [fail]: 175, [pass]: 1433, [skip]: 291

Check Patch Result

Total Errors 0
Total Warnings 0

@sterling-teng
Copy link
Contributor

分支已经滚动,请尽快rebase。

@github-actions
Copy link

github-actions bot commented Feb 2, 2026


开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/21575430992

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/206/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA Template lava-job-template/qemu/qemu-ltp.yaml
Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:

RVCK result

check result
kunit-test success
kernel-build failure
lava-trigger skipped
check-patch success

Kunit Test Result

[02:43:01] Testing complete. Ran 455 tests: passed: 443, skipped: 12

Kernel Build Result

Kernel build failed.

Check Patch Result

Total Errors 0
Total Warnings 0

@github-actions
Copy link

github-actions bot commented Feb 2, 2026


开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/21575451367

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/206/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA Template lava-job-template/qemu/qemu-ltp.yaml
Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:

RVCK result

check result
kunit-test success
kernel-build failure
lava-trigger skipped
check-patch success

Kunit Test Result

[02:44:18] Testing complete. Ran 455 tests: passed: 443, skipped: 12

Kernel Build Result

Kernel build failed.

Check Patch Result

Total Errors 0
Total Warnings 0

lyctw added 3 commits February 2, 2026 10:50
RSW field can be used to encode 2 bits of software
defined information. Currently, PTDUMP only prints
"RSW" when its value is 1 or 3.

To fix this issue and improve the debugging experience
with PTDUMP, we redefine _PAGE_SPECIAL to its original
value and use _PAGE_SOFT as the RSW mask, allow it to
print the RSW with any non-zero value.

This patch also removes the val from the struct prot_bits
as it is no longer needed.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20230921025022.3989723-2-peterlin@andestech.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This patch introduces the PBMT field to the PTDUMP, so it can
display the memory attributes for NC or IO.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20230921025022.3989723-3-peterlin@andestech.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This patch introduces the NAPOT field to PTDUMP, allowing it
to display the letter "N" for pages that have the 63rd bit set.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20230921025022.3989723-4-peterlin@andestech.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
@cp0613 cp0613 reopened this Feb 2, 2026
@github-actions
Copy link

github-actions bot commented Feb 2, 2026


开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/21575688889

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/206/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA Template lava-job-template/qemu/qemu-ltp.yaml
Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:

RVCK result

check result
kunit-test success
kernel-build failure
lava-trigger skipped
check-patch success

Kunit Test Result

[02:57:59] Testing complete. Ran 455 tests: passed: 443, skipped: 12

Kernel Build Result

Kernel build failed.

Check Patch Result

Total Errors 0
Total Warnings 0

@github-actions
Copy link

github-actions bot commented Feb 2, 2026


开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/21575688855

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/206/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA Template lava-job-template/qemu/qemu-ltp.yaml
Testcase path lava-testcases/common-test/ltp/ltp.yaml
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:

RVCK result

check result
kunit-test success
kernel-build failure
lava-trigger skipped
check-patch success

Kunit Test Result

[02:57:45] Testing complete. Ran 455 tests: passed: 443, skipped: 12

Kernel Build Result

Kernel build failed.

Check Patch Result

Total Errors 0
Total Warnings 0

@cp0613
Copy link
Contributor Author

cp0613 commented Feb 2, 2026

commit: https://lore.kernel.org/all/20230921025022.3989723-1-peterlin@andestech.com/

This patchset enhances PTDUMP by providing additional information from pagetable entries.

The first patch fixes the RSW field, while the second and third patches introduce the PBMT and NAPOT fields, respectively, for RV64 systems.

The ptdump (page table dump) feature in the Linux kernel prints the virtual memory page table structure, helping developers visualize address mappings, verify memory permissions, and debug issues like page faults or incorrect translations—especially useful during kernel bring-up and memory subsystem debugging.

@cp0613
Copy link
Contributor Author

cp0613 commented Feb 2, 2026

commit: https://lore.kernel.org/all/20230921025022.3989723-1-peterlin@andestech.com/

This patchset enhances PTDUMP by providing additional information from pagetable entries.

The first patch fixes the RSW field, while the second and third patches introduce the PBMT and NAPOT fields, respectively, for RV64 systems.

The original RISC-V ptdump implementation does not include the PBMT and NAPOT fields, which are memory attributes for NC, IO, or N. This series of patches enhances this information.

The testing methodology can be found at https://docs.kernel.org/arch/arm64/ptdump.html as follows:

CONFIG_PTDUMP_DEBUGFS=y

mount -t debugfs nodev /sys/kernel/debug
cat /sys/kernel/debug/kernel_page_tables

Before enhancement:

# mount -t debugfs nodev /sys/kernel/debug
# cat /sys/kernel/debug/kernel_page_tables
---[ Fixmap start ]---
0xffff8b7ffec00000-0xffff8b7fff000000    0x00000000bfe00000         4M PMD     D A G . . W R V
---[ Fixmap end ]---
---[ PCI I/O start ]---
0xffff8b7fff000000-0xffff8b7fff010000    0x0000000003000000        64K PTE     D A G . . W R V

After enhancement:

# mount -t debugfs nodev /sys/kernel/debug
# cat /sys/kernel/debug/kernel_page_tables
---[ Fixmap start ]---
0xffff8b7ffec00000-0xffff8b7fff000000    0x00000000bfe00000         4M PMD .   ..     ..   D A G . . W R V
---[ Fixmap end ]---
---[ PCI I/O start ]---
0xffff8b7fff000000-0xffff8b7fff010000    0x0000000003000000        64K PTE . MT(IO)   ..   D A G . . W R V

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants