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

Attempts to access non-existent CSRs are reserved #1207

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

aswaterman
Copy link
Member

Resolves #1116

@allenjbaum
Copy link

allenjbaum commented Jan 29, 2024 via email

@aswaterman
Copy link
Member Author

aswaterman commented Jan 29, 2024

Unimplemented CSRs don’t have a defined privilege level, so they can’t trap on the basis of privilege. (The use of bits 9:8 for privilege is just a convention, as is the use of bits 11:10 for writability. The priv spec could in principle contravene these conventions at any time, even though that would be a deeply unfortunate thing to do.)

@allenjbaum
Copy link

allenjbaum commented Jan 29, 2024 via email

@aswaterman
Copy link
Member Author

aswaterman commented Jan 29, 2024

The relevant sentence begins with the words "by convention".

@aswaterman aswaterman force-pushed the csr-nonexistent-reserved branch from 018a901 to 1436722 Compare January 29, 2024 06:25
@aswaterman aswaterman force-pushed the csr-nonexistent-reserved branch from 1436722 to 516685d Compare January 29, 2024 06:33
@pdonahue-ventana
Copy link
Contributor

Notably, the ratified debug 0.13 spec did not follow that convention. The mscontext CSR in debug 1.0 continues to not follow that convention but it's now deprecated and replaced by something that follows the convention.

Copy link
Collaborator

@gfavor gfavor left a comment

Choose a reason for hiding this comment

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

LGTM.

@aswaterman aswaterman merged commit 246efe0 into main Jan 30, 2024
2 checks passed
@aswaterman aswaterman deleted the csr-nonexistent-reserved branch January 30, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessing an unimplemented CSR is reserved, not necessarily illegal
4 participants