Browse Source
Merge pull request #2126 from chihminchao/dislabe-page-fault-delegation
csr: disalbe page fault delegation with nommu
pull/2125/head
Andrew Waterman
9 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
7 additions and
5 deletions
-
riscv/csrs.cc
-
riscv/csrs.h
|
|
|
@ -966,8 +966,11 @@ medeleg_csr_t::medeleg_csr_t(processor_t* const proc, const reg_t addr): |
|
|
|
| (1 << CAUSE_FETCH_GUEST_PAGE_FAULT) |
|
|
|
| (1 << CAUSE_LOAD_GUEST_PAGE_FAULT) |
|
|
|
| (1 << CAUSE_VIRTUAL_INSTRUCTION) |
|
|
|
| (1 << CAUSE_STORE_GUEST_PAGE_FAULT) |
|
|
|
) { |
|
|
|
| (1 << CAUSE_STORE_GUEST_PAGE_FAULT)), |
|
|
|
mmu_exceptions(0 |
|
|
|
| (1 << CAUSE_FETCH_PAGE_FAULT) |
|
|
|
| (1 << CAUSE_LOAD_PAGE_FAULT) |
|
|
|
| (1 << CAUSE_STORE_PAGE_FAULT)) { |
|
|
|
} |
|
|
|
|
|
|
|
void 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 { |
|
|
|
| (1 << CAUSE_STORE_ACCESS) |
|
|
|
| (1 << CAUSE_USER_ECALL) |
|
|
|
| (1 << CAUSE_SUPERVISOR_ECALL) |
|
|
|
| (1 << CAUSE_FETCH_PAGE_FAULT) |
|
|
|
| (1 << CAUSE_LOAD_PAGE_FAULT) |
|
|
|
| (1 << CAUSE_STORE_PAGE_FAULT) |
|
|
|
| (proc->supports_impl(IMPL_MMU) ? mmu_exceptions : 0) |
|
|
|
| (proc->extension_enabled('H') ? hypervisor_exceptions : 0) |
|
|
|
| (1 << CAUSE_SOFTWARE_CHECK_FAULT) |
|
|
|
| (1 << CAUSE_HARDWARE_ERROR_FAULT) |
|
|
|
|
|
|
|
@ -468,6 +468,7 @@ class medeleg_csr_t: public basic_csr_t { |
|
|
|
virtual bool unlogged_write(const reg_t val) noexcept override; |
|
|
|
private: |
|
|
|
const reg_t hypervisor_exceptions; |
|
|
|
const reg_t mmu_exceptions; |
|
|
|
}; |
|
|
|
|
|
|
|
class sip_csr_t: public mip_proxy_csr_t { |
|
|
|
|