Conversation
aswaterman
approved these changes
Apr 21, 2026
pipelinedestroyer
added a commit
to soct-org/rocket-chip
that referenced
this pull request
May 20, 2026
Incorporates upstream changes: - PTW: access vs guest page fault exception prioritization for Stage-1 PTEs with unsupported GPA sizes (chipsalliance#3789) - PTW: traverse check GPA bits higher than HGATP mode also if table (chipsalliance#3788) - PeripheryBus: named in/out xbars in getOrElse path - TraceEncoderController: add hartId parameter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue: Introduced by previous fix #3651.
Type of change: bug report
Impact: functional fix
Development Phase: implementation
Release Notes
In the failing scenario, a Stage-1 (VS-mode) table (non-leaf) PTE PPN is larger than the Stage-2 (G-stage) input GPA maximum size. The previous fix only validated GPA bits higher than the HGATP mode for leaf PTEs, but the specification requires this check for all PTEs during page table traversal, including non-leaf (table) PTEs, which this fix does.
Changes in
PTW.scala:gf: qualify the previous fix PTW: traverse check GPA bits higher than HGATP mode only if leaf #3651 to check for justpte.leaf()at the last level only. At non-last levels, this allows both leaf (superpage) and non-leaf entries.ae: suppress access exceptions when a guest page faultgfshould be taken instead.gpa_pgoff, even if they are higher than ther_ptecan hold, to use in reporting the faulting GPA in the equationresp.bits.gpa.bits.stateorcountto thes_fragment_superpagestate when reporting a fault from the PTW, so that ther_ptecaptured does not change in the equationresp.bits.gpa.bits.