Order implicit page table reads after invalidation
The `sfence.inval.ir` instruction guarantees that any previous `sinval.vma` instructions executed by the current hart are ordered before subsequent implicit references by that hart to the memory-management data structures.
sfence.inval.ir
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 000 | 11 | 000000 | 1 | 0000000000000 | 111 | 00 | 11 | ||||||||||||||||||||||||
if (mode() == PrivilegeMode::U) {
raise (ExceptionCode::IllegalInstruction, mode(), $encoding);
}
if (CSR[misa].H == 1 && mode() == PrivilegeMode::VU) {
raise (ExceptionCode::VirtualInstruction, mode(), $encoding);
}
# order all subsequent (implicit) loads after an sfence/hfence invalidation
# Unlike SFENCE.VMA/HFENCE.[GV]VMA, SFENCE.W.INVAL is indiscriminate;
# it orders all reads after all page tables
VmaOrderType vma_type;
vma_type.global = true;
vma_type.smode = true;
if (CSR[misa].H == 1) {
vma_type.vsmode = true;
vma_type.gstage = true;
}
order_pgtbl_reads_after_vmafence(vma_type);
Svinval
| S | U | VS | VU |
|---|---|---|---|
| Sometimes | Never | Sometimes | Never |
Version af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.