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

Remove bounds checks on jumps / branch. Simplify and clarify MEPCC an… #37

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

rmn30
Copy link
Collaborator

@rmn30 rmn30 commented Feb 19, 2024

…d MTCC behaviour.

As per #23 we want to delay the bounds check on jumps / branches until instruction fetch in order to simplify hardware. Due to this potentially leading to unrepresentable MEPCC values we also clear the tag of MEPCC on instruction fetch bounds violations. Due to this this got a bit mixed up with #30 which clarifies and simplifies validation and legalization of MEPCC / MTCC.

@rmn30 rmn30 force-pushed the no_jump_bounds_checks branch from c501bb5 to bec309a Compare February 19, 2024 16:47
@rmn30 rmn30 marked this pull request as ready for review February 19, 2024 17:35
…d MTCC behaviour.

As per #23 we want to delay the bounds check on jumps / branches until instruction
fetch in order to simplify hardware. Due to this potentially leading to
unrepresentable MEPCC values we also clear the tag of MEPCC on instruction fetch
bounds violations. Due to this this got a bit mixed up with #30 which clarifies
and simplifies validation and legalization of MEPCC / MTCC.
@rmn30 rmn30 force-pushed the no_jump_bounds_checks branch from bec309a to 8eeb926 Compare February 19, 2024 17:49
@rmn30
Copy link
Collaborator Author

rmn30 commented Feb 19, 2024

Some less immediately obvious changes:

  • Due to MEPCC / MTCC validation we can remove the check for sealed or non-executable PCC on instruction fetch. We only need tag and bounds checks. Untagged can only happen on mret with untagged MEPC or exception with untagged MTCC.
  • We don't support sealed-as-sentry MEPCC which was previously implemented in Sail but not mentioned in the ISA doc. I don't think there's a use for this and it gets complicated with mepc legalisation, interrupt disable / enable etc.
  • We clear MEPCC tag on any instruction fetch bounds failure even if MEPCC would have be representable. This simplifies hardware and the ISA vs current behaviour of preserving tag whenever possible (requiring representability check).
  • We're explicitly not supporting vectored interrupt mode. We decided it actually wasn't very useful. I could add it back if we decide we want it...

Copy link
Contributor

@kliuMsft kliuMsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@vmurali
Copy link
Collaborator

vmurali commented Feb 29, 2024

PTAL at #23 (comment) and #23 (comment). I think this PR is wrong.

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.

4 participants