vsatp
riscv_unified_db)RV32 / RV64 (Ratified & Standard Extensions)
main
VSHSummary
The vsatp register is a VSXLEN-bit read/write register that is VS-mode's version of supervisor register satp. When V=1, vsatp substitutes for the usual satp, so instructions that normally read or modify satp actually access vsatp instead. vsatp controls VS-stage address translation, the first stage of two-stage translation for guest virtual addresses.
Syntax / Encoding
CSR 0x280 (VS-mode, RW)
Bitfields (3)
| Bits | Field | Description |
|---|---|---|
63:60 | MODE | *Translation Mode* Controls the current translation mode in VS-mode according to the table below. [separator="!",%autowidth] ! Value ! Name ! Description ! 0 ! Bare a! No translation -> virtual address == physical address <%- if ext?(:Sv39) -%> ! 8 ! Sv39 ! 39-bit virtual address translation <%- end -%> <%- if ext? |
59:44 | ASID | *Address Space ID* [RV32: 30:22, RV64: 59:44] |
43:0 | PPN | *Physical Page Number* The physical address of the active root page table is PPN << 12. Can only hold values that correspond to a valid page table base, which will be implementation-dependent. [RV32: 21:0, RV64: 43:0] |
Reference Notes
The `vsatp` register is a VSXLEN-bit read/write register that is VS-mode's version of supervisor register `satp`. When V=1, `vsatp` substitutes for the usual `satp`, so instructions that normally read or modify `satp` actually access `vsatp` instead. `vsatp` controls VS-stage address translation, the first stage of two-stage translation for guest virtual addresses. The `vsatp` register is considered active for the purposes of the address-translation algorithm unless the effective privilege mode is U and `hstatus.HU`=0. However, even when `vsatp` is active, VS-stage page-table entries' A bits must not be set as a result of speculative execution, unless the effective privilege mode is VS or VU. [NOTE] In particular, virtual-machine load/store (`hlv`, 'hlvx', or 'hsv') instructions that are misspeculatively executed must not cause VS-stage A bits to be set. When V=0, a write to `vsatp` with an unsupported MODE value is either ignored as it is for `satp`, or the fields of `vsatp` are treated as WARL in the normal way. However, when V=1, a write to `satp` with an unsupported MODE value is ignored and no write to `vsatp` is effected.