fix(mmu): re-check cached G-stage DTLB-hit permissions after HLVX - #3468
Open
jf-cc727 wants to merge 1 commit into
Open
fix(mmu): re-check cached G-stage DTLB-hit permissions after HLVX#3468jf-cc727 wants to merge 1 commit into
jf-cc727 wants to merge 1 commit into
Conversation
Member
|
Thanks for the contribution, Do not forget to sign the required ECA |
jf-cc727
force-pushed
the
fix/cv-1-hlvx-gstage-permission
branch
from
August 12, 2026 11:47
73790b0 to
bb4f312
Compare
Author
|
Thank you for your review! I have signed the ECA. |
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.
This PR fixes a guest-stage permission issue on the cached G-stage / DTLB-hit path after a prior legal
HLVXaccess.It latches
hlvx_inst_itogether with the saved LSU request and re-checks guest-stage DTLB-hit permissions againstU,A, and the current loadR/Xrules. This prevents a prior legalHLVXaccess from causing a later plainHLVload to inherit execute-only permission on a cached translation.Related issue: #3456
Why this PR is still needed:
#3435 fixes a related but different PTW/page-walk path, where an implicit G-stage access happens while translating a VS-stage PTE address. However, the original CV-1 reproducer still hits an additional cached G-stage / DTLB-hit path in
cva6_mmu.sv, which does not go back through that PTW logic.Validation:
tohost = 0)Current limitation:
This is a targeted fix for the cached guest-stage hit path exercised by the reproducer. It does not refactor the related PTW logic.