Browse Source
It never has effect when V=1. HFENCE.GVMA and the hgatp CSR must respect it (when V=0).pull/552/head
3 changed files with 14 additions and 7 deletions
@ -1,4 +1,4 @@ |
|||
require_extension('H'); |
|||
require_novirt(); |
|||
require_privilege(PRV_S); |
|||
require_privilege(get_field(STATE.mstatus, MSTATUS_TVM) ? PRV_M : PRV_S); |
|||
MMU.flush_tlb(); |
|||
|
|||
@ -1,5 +1,8 @@ |
|||
require_extension('S'); |
|||
if (STATE.v && (STATE.prv == PRV_U || get_field(STATE.hstatus, HSTATUS_VTVM))) |
|||
require_novirt(); |
|||
require_privilege(get_field(STATE.mstatus, MSTATUS_TVM) ? PRV_M : PRV_S); |
|||
if (STATE.v) { |
|||
if (STATE.prv == PRV_U || get_field(STATE.hstatus, HSTATUS_VTVM)) |
|||
require_novirt(); |
|||
} else { |
|||
require_privilege(get_field(STATE.mstatus, MSTATUS_TVM) ? PRV_M : PRV_S); |
|||
} |
|||
MMU.flush_tlb(); |
|||
|
|||
Loading…
Reference in new issue