File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -966,8 +966,11 @@ medeleg_csr_t::medeleg_csr_t(processor_t* const proc, const reg_t addr):
966966 | (1 << CAUSE_FETCH_GUEST_PAGE_FAULT)
967967 | (1 << CAUSE_LOAD_GUEST_PAGE_FAULT)
968968 | (1 << CAUSE_VIRTUAL_INSTRUCTION)
969- | (1 << CAUSE_STORE_GUEST_PAGE_FAULT)
970- ) {
969+ | (1 << CAUSE_STORE_GUEST_PAGE_FAULT)),
970+ mmu_exceptions(0
971+ | (1 << CAUSE_FETCH_PAGE_FAULT)
972+ | (1 << CAUSE_LOAD_PAGE_FAULT)
973+ | (1 << CAUSE_STORE_PAGE_FAULT)) {
971974}
972975
973976void medeleg_csr_t::verify_permissions (insn_t insn, bool write) const {
@@ -988,9 +991,7 @@ bool medeleg_csr_t::unlogged_write(const reg_t val) noexcept {
988991 | (1 << CAUSE_STORE_ACCESS)
989992 | (1 << CAUSE_USER_ECALL)
990993 | (1 << CAUSE_SUPERVISOR_ECALL)
991- | (1 << CAUSE_FETCH_PAGE_FAULT)
992- | (1 << CAUSE_LOAD_PAGE_FAULT)
993- | (1 << CAUSE_STORE_PAGE_FAULT)
994+ | (proc->supports_impl (IMPL_MMU) ? mmu_exceptions : 0 )
994995 | (proc->extension_enabled (' H' ) ? hypervisor_exceptions : 0 )
995996 | (1 << CAUSE_SOFTWARE_CHECK_FAULT)
996997 | (1 << CAUSE_HARDWARE_ERROR_FAULT)
Original file line number Diff line number Diff line change @@ -468,6 +468,7 @@ class medeleg_csr_t: public basic_csr_t {
468468 virtual bool unlogged_write (const reg_t val) noexcept override ;
469469 private:
470470 const reg_t hypervisor_exceptions;
471+ const reg_t mmu_exceptions;
471472};
472473
473474class sip_csr_t : public mip_proxy_csr_t {
You can’t perform that action at this time.
0 commit comments