Browse Source
Merge pull request #1733 from chihminchao/fix-ssqosid
ssqosid: modify permission check condition for srmcfg
pull/1741/head
Andrew Waterman
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
2 deletions
-
riscv/csrs.cc
|
|
|
@ -1751,8 +1751,6 @@ srmcfg_csr_t::srmcfg_csr_t(processor_t* const proc, const reg_t addr, const reg_ |
|
|
|
} |
|
|
|
|
|
|
|
void srmcfg_csr_t::verify_permissions(insn_t insn, bool write) const { |
|
|
|
csr_t::verify_permissions(insn, write); |
|
|
|
|
|
|
|
if (!proc->extension_enabled(EXT_SSQOSID)) |
|
|
|
throw trap_illegal_instruction(insn.bits()); |
|
|
|
|
|
|
|
@ -1763,6 +1761,10 @@ void srmcfg_csr_t::verify_permissions(insn_t insn, bool write) const { |
|
|
|
|
|
|
|
if (state->v) |
|
|
|
throw trap_virtual_instruction(insn.bits()); |
|
|
|
|
|
|
|
if (state->prv < PRV_S) { |
|
|
|
throw trap_illegal_instruction(insn.bits()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
hvip_csr_t::hvip_csr_t(processor_t* const proc, const reg_t addr, const reg_t init): |
|
|
|
|