Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCache prioritizes misaligned above guest/page fault #2926

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

ingallsj
Copy link
Contributor

@ingallsj ingallsj commented Jan 7, 2022

Related issue: replaces #2921

Type of change: bug report

Impact: functional change

Development Phase: implementation

Release Notes
PTW fault prioritization: if a PTW doesn't finish with a valid PTE, then we cannot check if the memory address has side effects to take a misaligned exception. So move misaligned fault priority to last.

@ingallsj ingallsj merged commit a16dc47 into master Jan 11, 2022
@ingallsj ingallsj deleted the misaligned_ldst_fault branch January 11, 2022 18:10
@sammy17
Copy link

sammy17 commented Jan 18, 2022

Hi, could you please explain what are the side-effects mentioned in this release notes?
Can't we check whether the address is misaligned or not when we only know the address?
Thank you in advance!

@ingallsj
Copy link
Contributor Author

Hi, could you please explain what are the side-effects mentioned in this release notes?

Memory-Mapped I/O devices can have side-effects when accessed. Some examples:

  • setting or clearing a flag in another memory-mapped register location.
  • sending or clearing an interrupt.
  • flushing a cache block.

Crucially: accesses to memory-mapped I/O devices with side-effects cannot be emulated by splitting them into one-byte-at-a-time accesses.

Can't we check whether the address is misaligned or not when we only know the address?

Yes, we can, but Rocket distinguishes between an emulate-able misaligned access, which takes a misaligned fault for machine mode to emulate it, or a non-emulate-able misaligned access to a side-effect memory address, which takes an access fault to not be emulated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants