Browse Source

Merge pull request #1789 from YenHaoChen/pr-pm

pointer masking: Consider effective v bit instead of current v bit
pull/1791/head
Andrew Waterman 2 years ago
committed by GitHub
parent
commit
272c149f37
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      riscv/mmu.cc

2
riscv/mmu.cc

@ -614,7 +614,7 @@ void mmu_t::register_memtracer(memtracer_t* t)
}
reg_t mmu_t::get_pmlen(bool effective_virt, reg_t effective_priv, xlate_flags_t flags) const {
if (!proc || proc->get_xlen() != 64 || (proc->state.sstatus->read() & MSTATUS_MXR) || flags.hlvx)
if (!proc || proc->get_xlen() != 64 || (proc->state.sstatus->readvirt(effective_virt) & MSTATUS_MXR) || flags.hlvx)
return 0;
reg_t pmm = 0;

Loading…
Cancel
Save