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

Let MXR not affect implicit memory access for VS-stage address translation #1760

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion riscv/mmu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ reg_t mmu_t::s2xlate(reg_t gva, reg_t gpa, access_type type, access_type trap_ty
int maxgpabits = vm.levels * vm.idxbits + vm.widenbits + PGSHIFT;
reg_t maxgpa = (1ULL << maxgpabits) - 1;

bool mxr = proc->state.sstatus->readvirt(false) & MSTATUS_MXR;
bool mxr = !is_for_vs_pt_addr && (proc->state.sstatus->readvirt(false) & MSTATUS_MXR);
// tinst is set to 0x3000/0x3020 - for RV64 read/write respectively for
// VS-stage address translation (for spike HSXLEN == VSXLEN always) else
// tinst is set to 0x2000/0x2020 - for RV32 read/write respectively for
Expand Down
Loading