CSR Bit Fields

RISC-V vsatp CSR Register

Address 0x280Privilege Hypervisor direct / VS aliasAccess HRW / VSXLENHypervisor and virtualization CSRs

vsatp is the VS-stage translation-root CSR holding paging MODE, ASID, and the VS root page-table PPN; when V=1 it substitutes for satp.

Field Map

Understand vsatp By Bit Fields

3 key fields
63:60

MODE

WARL

VS-stage address translation mode encoding.

MODE (bits 63:60) — VS-stage address translation mode encoding.

What This Field Controls

  • - VS-stage address translation mode encoding.

Common Values

0Bare

No paged address translation; when selecting Bare, the remaining fields must be written as zero.

1-7Reserved

Reserved encodings for RV64 satp.MODE; portable software must not write or depend on them.

8Sv39

Enables Sv39 paged virtual memory.

9Sv48

Enables Sv48 paged virtual memory.

10Sv57

Enables Sv57 paged virtual memory.

11Reserved / Sv64 future

Reserved in this version for a future Sv64 scheme.

12-13Reserved

Reserved encodings for RV64 satp.MODE; vsatp substitutes for satp when V=1 and follows this mode table, so portable software must not write or depend on them.

14-15Custom use

Custom-use encodings for RV64 satp.MODE; vsatp follows the satp mode table. These encodings have no general portable meaning, and ordinary portable software should not depend on them.

Open Official Manual
59:44

ASID

WARL

VS address-space identifier.

ASID (bits 59:44) — VS address-space identifier.

What This Field Controls

  • - VS address-space identifier.

Common Values

This field is better understood together with surrounding context than as a fixed memorized enumeration.

Open Official Manual
43:0

PPN

WARL

Physical page number of the VS root page table.

PPN (bits 43:0) — Physical page number of the VS root page table.

What This Field Controls

  • - Physical page number of the VS root page table.

Common Values

This field is better understood together with surrounding context than as a fixed memorized enumeration.

Open Official Manual
Official Basis & Search Notes

vsatp is the VS-stage address-translation root CSR. When V=1, guest access to satp is substituted with vsatp; direct access to the separate vsatp address raises a virtual-instruction exception.

vsatp address 0x280, HRW access, and VSXLEN width come from the official Hypervisor/VS CSR table.
MODE, ASID, and PPN are WARL fields for both VSXLEN=32 and VSXLEN=64, using the satp MODE encodings.
When V=0, vsatp ordinarily has no direct machine effect unless a virtual-machine load/store or MPRV makes a memory access execute as though V=1.
For unsupported MODE values, a V=0 write to vsatp may be ignored as for satp or handled as normal WARL; with V=1, a write to satp with unsupported MODE is ignored and does not write vsatp.

What To Check First When Reading This CSR

  • - vsatp's separate CSR address is in the official HRW access class; when V=1, VS-mode access to satp is substituted with vsatp.
  • - Before reading it, confirm that the H extension is implemented and distinguish M/HS direct access to the separate vsatp address from VS-mode satp alias access.

Risk Checks Before Writing

  • - When writing vsatp, use a supported MODE; when selecting Bare, write zero to the remaining fields, and note that unsupported-MODE writes differ between V=0 direct writes and the V=1 satp alias path.

Put It Back Into A Real Flow

1

Set MODE, ASID, and root page-table PPN.

2

A guest reaches VS-stage state through the satp alias.

3

Manage it together with hgatp for two-stage translation.

FAQ

How does vsatp differ from hgatp?

vsatp controls the guest-virtual to guest-physical VS-stage; hgatp controls the guest-physical to supervisor-physical G-stage.

Does VS-mode directly access the vsatp address?

It does not directly access the separate vsatp address; when V=1, access to satp is substituted with vsatp.