-
Notifications
You must be signed in to change notification settings - Fork 855
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
Add Smcntrpmf support #1381
Add Smcntrpmf support #1381
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know anything about the spec for this feature, but I have some comments on the implementation.
d0f1fea
to
75721c6
Compare
@scottj97 Sorry for taking so long to turnaround, but for some reason, I wasn't receiving any notifications on the comments. The specification can be found here: https://github.com/riscv/riscv-smcntrpmf/releases/download/v1.0_rc2/riscv-smcntrpmf-v1.0_rc2.pdf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reviewed only the implementation, and not its adherence to the spec, but this looks good to me.
75721c6
to
a15c6ae
Compare
This tracks whether the privilege / virtual mode was changed by the execution of the current instruction.
If Smcntrpmf is enabled, mcycle / minstret increment only if counting for the privilege level isn't inhibited in mcyclecfg / minstretcfg.
a15c6ae
to
c927773
Compare
This adds support for the "Cycle & Instret Privilege Mode Filtering Architecture" extension ( https://github.com/riscv/riscv-smcntrpmf/releases/download/v1.0_rc2/riscv-smcntrpmf-v1.0_rc2.pdf).