Skip to content

Comments

Improve PTDUMP and introduce new fields#206

Open
cp0613 wants to merge 3 commits intoRVCK-Project:rvck-6.6from
cp0613:rvck-6.6
Open

Improve PTDUMP and introduce new fields#206
cp0613 wants to merge 3 commits intoRVCK-Project:rvck-6.6from
cp0613:rvck-6.6

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.

issue: #205

@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

@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

@github-actions
Copy link

github-actions bot commented Feb 3, 2026


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

参数解析结果
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:21] Testing complete. Ran 455 tests: passed: 443, skipped: 12

Kernel Build Result

Kernel build failed.

Check Patch Result

Total Errors 0
Total Warnings 3

@sterling-teng
Copy link
Contributor

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

Thank you for the method you provided. It is very helpful to review.

@sterling-teng
Copy link
Contributor

CI test failed; debug the code.

@sterling-teng
Copy link
Contributor

sterling-teng commented Feb 4, 2026

/check


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

参数解析结果
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

[15:57:54] Testing complete. Ran 455 tests: passed: 443, skipped: 12

Kernel Build Result

Kernel build failed.

Check Patch Result

Total Errors 0
Total Warnings 3

@github-actions
Copy link

github-actions bot commented Feb 5, 2026


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

参数解析结果
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

[05:55:38] Testing complete. Ran 455 tests: passed: 443, skipped: 12

Kernel Build Result

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

5a06aee9c767d3c437defc041489ec78 /srv/guix_result/4eb701bc522ae65f41e405926f3a6dcc60fe4c4e/Image
e7cd18df73e2c4ac6b729c9a0270745e /root/initramfs.img

LAVA Check

args:

result:

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

lava result count: [fail]: 175, [pass]: 1434, [skip]: 290

Check Patch Result

Total Errors 0
Total Warnings 3

@cp0613
Copy link
Contributor Author

cp0613 commented Feb 9, 2026

@sterling-teng 该PR CI已经通过,自测通过,请帮忙review合入。

@sterling-teng
Copy link
Contributor

@sterling-teng 该PR CI已经通过,自测通过,请帮忙review合入。

你的补丁似乎缺少你自己的SOB签名。

@sterling-teng
Copy link
Contributor

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.

这里也需要引用下issue

@sterling-teng
Copy link
Contributor

除了以上两个之外,没有别的问题了。

@github-actions
Copy link

github-actions bot commented Feb 11, 2026


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

参数解析结果
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

[01:37:04] Testing complete. Ran 457 tests: passed: 445, skipped: 12

Kernel Build Result

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

cc4708931325a6b9f2492f5fb4c8e2d2 /srv/guix_result/975a81fb2143ecdb3aed10ea39002dad43bbdbe6/Image
4fcf71023dab5c94c1dcff9d3a7b3709 /root/initramfs.img

LAVA Check

args:

result:

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

lava result count: [fail]: 175, [pass]: 1434, [skip]: 290

Check Patch Result

Total Errors 0
Total Warnings 3

mainline inclusion
from mainline-v6.7-rc1
commit d5d2c26
category: feature
bugzilla: RVCK-Project#205

--------------------------------

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>
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
mainline inclusion
from mainline-v6.7-rc1
commit 0713ff3
category: feature
bugzilla: RVCK-Project#205

--------------------------------

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>
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
mainline inclusion
from mainline-6.7-rc1
commit 015c3c3
category: feature
bugzilla: RVCK-Project#205

--------------------------------

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>
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
@cp0613 cp0613 reopened this Feb 11, 2026
@github-actions
Copy link

github-actions bot commented Feb 11, 2026


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

参数解析结果
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 failure
check-patch success

Kunit Test Result

[01:38:59] Testing complete. Ran 457 tests: passed: 445, skipped: 12

Kernel Build Result

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

5ea7a8530d685c25f02a3bae4329703a /srv/guix_result/329d9947dd14cae84ff9d8ebb80d13d938de23a0/Image
7f2a4185ddc841a337f5af70550277dd /root/initramfs.img

LAVA Check

args:

result:

Lava check fail! lava log: https://lava.oerv.ac.cn/scheduler/job/1416

lava result count: call: 1

Check Patch Result

Total Errors 0
Total Warnings 3

@github-actions
Copy link

github-actions bot commented Feb 11, 2026


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

参数解析结果
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 failure
check-patch success

Kunit Test Result

[01:39:07] Testing complete. Ran 457 tests: passed: 445, skipped: 12

Kernel Build Result

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

534f3989b450ff95c248fb5254fda8ce /srv/guix_result/329d9947dd14cae84ff9d8ebb80d13d938de23a0/Image
b1b24779fc9fdeb0e0ae91edefe4cdf8 /root/initramfs.img

LAVA Check

args:

result:

Lava check fail! lava log: https://lava.oerv.ac.cn/scheduler/job/1415

lava result count: call: 1

Check Patch Result

Total Errors 0
Total Warnings 3

测试完成

详细结果:

RVCK result

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

Kunit Test Result

[01:39:07] Testing complete. Ran 457 tests: passed: 445, skipped: 12

Kernel Build Result

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

534f3989b450ff95c248fb5254fda8ce /srv/guix_result/329d9947dd14cae84ff9d8ebb80d13d938de23a0/Image
b1b24779fc9fdeb0e0ae91edefe4cdf8 /root/initramfs.img

LAVA Check

args:

result:

Lava check fail! lava log: https://lava.oerv.ac.cn/scheduler/job/1415

lava result count: call: 1

Check Patch Result

Total Errors 0
Total Warnings 3

@cp0613
Copy link
Contributor Author

cp0613 commented Feb 11, 2026

除了以上两个之外,没有别的问题了。

  1. 补丁已增加签名
  2. 已引用issue

@cp0613
Copy link
Contributor Author

cp0613 commented Feb 11, 2026

/check


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

参数解析结果
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

[02:48:02] Testing complete. Ran 457 tests: passed: 445, skipped: 12

Kernel Build Result

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

c0c30bdfa1dbde651dcc99a0fe6b41f7 /srv/guix_result/329d9947dd14cae84ff9d8ebb80d13d938de23a0/Image
bc1667d1f9ea15108ce932cca8e75a6a /root/initramfs.img

LAVA Check

args:

result:

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

lava result count: [fail]: 175, [pass]: 1434, [skip]: 290

Check Patch Result

Total Errors 0
Total Warnings 3

@sterling-teng
Copy link
Contributor

sterling-teng commented Feb 11, 2026

/check


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

参数解析结果
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

[15:59:44] Testing complete. Ran 457 tests: passed: 445, skipped: 12

Kernel Build Result

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

8c23049153d462e57dad5fd797a6de3e /srv/guix_result/329d9947dd14cae84ff9d8ebb80d13d938de23a0/Image
6c2752c2d1a29ee338fd75ebc9a9bc22 /root/initramfs.img

LAVA Check

args:

result:

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

lava result count: [fail]: 175, [pass]: 1434, [skip]: 290

Check Patch Result

Total Errors 0
Total Warnings 3

@sterling-teng
Copy link
Contributor

需要澄清一下ci未通过的原因。

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