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

pointer masking: Consider effective v bit instead of current v bit #1789

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

YenHaoChen
Copy link
Collaborator

I am sorry that I overlooked an implication of the modification in RC2.

A previous commit removes the effectiveness of MPRV to MXR. (#1784)
However, the removal implies the MPRV affects point masking individually, and the MXR should consider the effective v bit.

A previous commit removes the effectiveness of MPRV to MXR.
(riscv-software-src#1784)

However, the removal implies the MPRV affects point masking
individually, and the MXR should consider the effective v bit.
@aswaterman aswaterman merged commit 272c149 into riscv-software-src:master Aug 28, 2024
3 checks passed
@aswaterman
Copy link
Collaborator

aswaterman commented Aug 28, 2024

@YenHaoChen Wait, I'm not sure this version is correct, either. Don't you want to do the same thing as in mmu_t::walk, i.e.

bool mxr = (proc->state.sstatus->readvirt(false) | proc->state.sstatus->readvirt(effective_virt)) & MSTATUS_MXR;

i.e. sstatus.MXR always applies regardless of effective V, and vsstatus.MXR additionally applies when effective V=1.

@YenHaoChen YenHaoChen deleted the pr-pm branch August 29, 2024 07:46
@YenHaoChen YenHaoChen restored the pr-pm branch August 29, 2024 07:47
@YenHaoChen
Copy link
Collaborator Author

I did not aware that asserting mstatus.MXR overrides vsstatus.MXR to 1.

image

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.

2 participants