Webcentive RISC-V Reference

vsatp

Virtual supervisor address translation and protection

Address
0x280
Group
Hypervisor and VS CSRs
Privilege
HRW (privileged spec CSR listing, Virtual Supervisor Registers)
Access
read/write; lowest privilege H (hypervisor, including VS CSRs)
Address range
Standard read/write
Name in riscv-unified-db
Virtual Supervisor Address Translation and Protection

Privileged spec: Virtual supervisor address translation and protection

Description

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.

From riscv-unified-db, reformatted.

Fields

FieldBitsTypeDescription
MODERV32 31 / RV64 63-60RW-R

Translation Mode

Controls the current translation mode in VS-mode according to the table below.

ValueNameDescription
0BareNo translation -> virtual address == physical address When Sv39 is implemented:
8Sv3939-bit virtual address translation When Sv48 is implemented:
9Sv4848-bit virtual address translation When Sv57 is implemented:
10Sv5757-bit virtual address translation

Any other value shall be ignored on a write.

ASIDRV32 30-22 / RV64 59-44RW-R

Address Space ID

PPNRV32 21-0 / RV64 43-0RW-R

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.

Fields from riscv-unified-db; field types computed by IDL functions there are not shown.

Specification and related pages