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

stimecmp: perform menvcfg.STCE permission check when accessing vstimecmp in HS-mode #1511

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

YenHaoChen
Copy link
Collaborator

The spec requires menvcfg.STCE=1 on accessing stimecmp or vstimecmp in a mode other than M-mode. The previous implementation does not check the permission on accessing vstimecmp in HS-mode. This commit fixes the issue by moveing the permission check from virtualized_stimecmp_csr_t to stimecmp_csr_t, which implements the vstimecmp.
image

@YenHaoChen YenHaoChen force-pushed the pr-stimecmp branch 2 times, most recently from 6367b06 to ef5ff22 Compare November 23, 2023 09:27
…cmp in HS-mode

The spec requires menvcfg.STCE=1 on accessing stimecmp or vstimecmp in a
mode other than M-mode. The previous implementation does not check the
permission on accessing vstimecmp in HS-mode. This commit fixes the
issue by moveing the permission check from virtualized_stimecmp_csr_t to
stimecmp_csr_t, which implements the vstimecmp.
@aswaterman
Copy link
Collaborator

@i2h2 please review this PR.

@i2h2
Copy link
Contributor

i2h2 commented Nov 24, 2023

I think it looks good. Thanks for fixing!

Copy link
Collaborator

@aswaterman aswaterman left a comment

Choose a reason for hiding this comment

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

Approving on the basis of @i2h2's review.

@aswaterman aswaterman merged commit 90aa49f into riscv-software-src:master Nov 25, 2023
3 checks passed
@YenHaoChen YenHaoChen deleted the pr-stimecmp branch November 26, 2023 23:55
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.

3 participants