ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,761 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

vsatp

T1 riscv register register
Virtual Supervisor Address Translation and Protection
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (H)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeVS
ExtensionsH

Summary

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)

BitsFieldDescription
63:60MODE*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:44ASID*Address Space ID* [RV32: 30:22, RV64: 59:44]
43:0PPN*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.