Skip to content

Check reserved bits in non-leaf PTEs - #1815

Open
flaviens wants to merge 2 commits into
openhwgroup:mainfrom
flaviens:fix/nonleaf-pte-reserved
Open

Check reserved bits in non-leaf PTEs#1815
flaviens wants to merge 2 commits into
openhwgroup:mainfrom
flaviens:fix/nonleaf-pte-reserved

Conversation

@flaviens

Copy link
Copy Markdown

Non-leaf checking covered PBMT but ignored N plus reserved bits. Check PTE[63:54].

@flaviens
flaviens marked this pull request as ready for review August 22, 2026 06:50
Copilot AI lite review requested due to automatic review settings August 22, 2026 06:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens hypervisor page-table-walk (HPTW) validation for non-leaf PTEs in the MMU by expanding the reserved-bit check to cover the full PTE[63:54] range on RV64, aligning behavior with the expectation that N/PBMT/reserved upper bits must be zero for non-leaf entries.

Changes:

  • Expand non-leaf PTE reserved-bit fault detection from PTE[62:61] (PBMT only) to PTE[63:54] (includes N + reserved bits) on RV64.
  • Preserve RV32 behavior by keeping the fault disabled when P.XLEN != 64.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/mmu/hptw.sv
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