Repository navigation
IFU: do not spill a fetch whose first half faults - #1982
Merged
rosethompson merged 3 commits intoOct 16, 2026
Merged
Conversation
When the first half of a fetch that crosses a cache line or page faults, its bits are not the instruction, so its length is unknown. The IFU still decided to spill from those stale bits and ORed the second half's page fault into the first half's access fault, reporting an instruction page fault with xtval at the first half (openhwfoundation#1980, finding E). Take the spill only when the first half fetches cleanly; a faulting first half is then reported alone, which also makes the first-half fault latch unnecessary. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: David Harris <David_Harris@hmc.edu>
Contributor
Author
|
Review notes: the RTL is correct and adds no timing depth (
🤖 Generated with Claude Code |
Contributor
Author
|
Merge order: pairs with #1968 (IFU fetch-buffer reset; merge both) and with #1986, the LSU counterpart (no spill on a first-half fault). The three merge cleanly together. 🤖 Generated with Claude Code |
This was referenced Oct 16, 2026
spillbothhalvesfault.S fetches a 32-bit instruction whose first half is in a PMP no-execute grain at the end of page A and whose second half is on a non-executable page B. The first half's access fault must be reported alone (mcause 1, mtval at the first half); main reports the second half's page fault (mcause 12), and ImperasDV lockstep flags the mismatch. Rename the spill port ITLBMissOrUpdateAF to ITLBMissOrUpdateRawF: it must be the miss before masking by a walk fault, since that is what keeps a faulting first-half walk from taking the spill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Addressed the review notes:
🤖 Generated with Claude Code |
rosethompson
approved these changes
Oct 16, 2026
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.
Fixes finding E in #1980. When the first half of a fetch that crosses a cache line or page faulted, the IFU still decided to spill from the faulting fetch's stale bits and ORed in the second half's page fault, so it reported an instruction page fault with xtval at the first half where Sail and ImperasDV report the first half's access fault. The spill is now taken only when the first half fetches cleanly, so a faulting first half is reported alone, and the first-half fault latch added for #1838 is no longer needed.
🤖 Generated with Claude Code