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

Clarify CHERI PTE fault priority when 2-stage translation is in use #547

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tariqkurd-repo
Copy link
Collaborator

@tariqkurd-repo tariqkurd-repo commented Feb 26, 2025

CHERI PTE faults sometimes require a tag check which is not available until after two stage translation has completed and so can not be prioritised above guest page faults, even if other page faults are detected before completing translation.

There are occasions when a PTE permission fault can be taken, but the 2-stage translation hasn't finished, and so a load cannot have executed yet (as the physical address isn't available yet), and so the tag cannot be checked. In this case the page fault will be taken without reporting a CHERI PTE fault. It makes sense to say the same for the store.

the order is

possible page fault due to permissions
finish two-stage translation (possible guest page fault)
possible CHERI PTE fault

so it's not always possible to detect both the normal and the CHERI PTE page faults at once

@nwf
Copy link
Collaborator

nwf commented Feb 26, 2025

Seems right to me.

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