Skip to content

Add hptwReservedAD regression test for reserved leaf PTE A/D updates - #1993

Merged
rosethompson merged 1 commit into
openhwfoundation:mainfrom
davidharrishmc:dh/hptw-reserved-ad-test
Oct 19, 2026
Merged

rosethompson merged 1 commit into
openhwfoundation:mainfrom
davidharrishmc:dh/hptw-reserved-ad-test

Conversation

@davidharrishmc

Copy link
Copy Markdown
Contributor

#1916 fixed item 15 of #1921 (the page table walker set A/D on leaf PTEs with reserved PBMT, NAPOT or bits 60:54 before the store page fault) but added no test, and #1938, which had one, was closed as redundant. This adds that test, tests/coverage/hptwReservedAD.S, which runs on rv64gc with the rest of tests/coverage: each reserved leaf must take a store page fault with the PTE unchanged, and legal PTEs (including PBMT=NC with PBMTE=1) must still get A and D. It fails if the walker's LeafReservedFault check is removed.

🤖 Generated with Claude Code

openhwfoundation#1916 stopped the page table walker from setting A/D on leaf PTEs with
reserved encodings, but added no test.  hptwReservedAD (from the closed
openhwfoundation#1938) stores through leaves with PBMT=3, PBMT!=0 while menvcfg.PBMTE=0,
a reserved NAPOT encoding and bit 54 set, and checks each takes a store
page fault with the PTE unchanged, while legal PTEs still get A and D.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: David Harris <David_Harris@hmc.edu>
@rosethompson
rosethompson merged commit 5203515 into openhwfoundation:main Oct 19, 2026
3 checks passed
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