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

MXR for store instructions #80

Open
BiwefC opened this issue Aug 15, 2024 · 4 comments
Open

MXR for store instructions #80

BiwefC opened this issue Aug 15, 2024 · 4 comments

Comments

@BiwefC
Copy link

BiwefC commented Aug 15, 2024

MPRV and SPVP affect pointer masking as well, causing the pointer masking settings of the effective privilege mode to be applied. When MXR is in effect at the effective privilege mode where explicit memory access is performed, pointer masking does not apply.

In pointer-masking v1.0.0-rc2, MXR will effect whether pointer masking is applied or not. But should store instructions is applied with pointer masking be affected by MXR? If so, why should they be affected?

@pdonahue-ventana
Copy link
Contributor

MXR never affects store instructions. It makes executable pages readable, not writable. Pointer masking isn't going to change that.

@BiwefC
Copy link
Author

BiwefC commented Aug 15, 2024

MXR never affects store instructions. It makes executable pages readable, not writable. Pointer masking isn't going to change that.

img_v3_02dp_4e390b0a-6abb-4d30-aa43-cec8a3a7ed0g
But in Spike implementation, pmm directly masked by MXR, regardless of the instruction type. Does this means that there is an issue in Spike's implementation?

@SiFiveHolland
Copy link

SiFiveHolland commented Aug 15, 2024

I think the implication is that yes, MXR affects pointer masking for both both loads and stores, but it doesn't really matter because there's no known use case for doing stores with MXR enabled (execute-only pages aren't writable).

Spike is following the spec.

@martinmaas
Copy link
Collaborator

I agree with @SiFiveHolland. I think there is nothing in the spec that says it doesn't apply to stores, but it does not matter.

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

No branches or pull requests

4 participants