-
Notifications
You must be signed in to change notification settings - Fork 17
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
MXR in effect at the effective privilege level #83
Comments
To further clarify my question, what is the intention of the phrase: Is it implying that the implementation needs to look at the MXR for the effective privilege mode. One of:
Furthermore, does this MXR disabling of pointer masking extend down to U and VU mode? |
… of MPRV in v1.0.0-rc2 Reference: riscv/riscv-j-extension#70
Apologies for the slightly delayed response. This was a detail where there was quite a bit of iteration with the Architecture Review Committee. The intention is that whichever MXR field governs a particular memory access (if there is such a field), that MXR field is used to determine whether pointer masking applies (if MXR is set, pointer masking does not apply; if it is not set or there is no governing MXR field, pointer masking does apply). I believe the two quotes you mentioned in your first comment are consistent and correct in this regard. However, I think the Spike implementation might be slightly incorrect – here is how MXR is determined for regular memory accesses, which I think is the same logic that pointer masking would use as well: I think the reason this is correct is that (IIUC) the MXR bit exposed via sstatus is the same as the one in mstatus (the privileged spec states: "The mstatus bit MXR has been exposed to S-mode via sstatus"). I therefore think it is probably correct to only look at sstatus. The case where the current Spike implementation might be incorrect is 2-stage translation, since it is not taken into account here when it should be.
I believe this is the case. Let me add @aswaterman @Adam-pi3 to also take a look and confirm. |
This was fixed in Spike over the last few days: riscv-software-src/riscv-isa-sim#1791 |
I'm aligned with @martinmaas analysis. |
Since the Spike fix is consistent with Martin's analysis, I think we can probably close this one. |
Originally posted by @martinmaas in #70 (comment)
This specification text is contradicted by other changes such as the non-normative statement recently made in #82
It is also contradicted by riscv-software-src/riscv-isa-sim#1784
If these contradictory statements were true, the specification text could be simplified to
Which is correct?
The text was updated successfully, but these errors were encountered: