CSR Bit Fields

RISC-V vsstatus CSR Register

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

vsstatus holds VS supervisor status state as the VS copy of the corresponding supervisor CSR.

Bit Overview
bit 3 = only bit 3; bits 12..11 = bits 12 down to 11
MSBLSB
SD63ROReserved0
Field Map

Understand vsstatus By Bit Fields

12 key fields
63

SD

RO

Summary dirty bit for FS, VS, and XS as visible to VS-mode.

SD (bit 63) — Summary dirty bit for FS, VS, and XS as visible to VS-mode.

What This Field Controls

  • - Summary dirty bit for FS, VS, and XS as visible to VS-mode.

Common Values

00

No FS, VS, or XS field is Dirty.

11

At least one of FS, VS, or XS is Dirty.

Open Official Manual
33:32

UXL

RW

On RV64, controls the effective XLEN for VU-mode; absent when VSXLEN=32.

UXL (bits 33:32) — On RV64, controls the effective XLEN for VU-mode; absent when VSXLEN=32.

What This Field Controls

  • - On RV64, controls the effective XLEN for VU-mode; absent when VSXLEN=32.

Common Values

132-bit

Effective XLEN is 32.

264-bit

Effective XLEN is 64.

3Reserved

Reserved encoding; portable software must not write or depend on it.

Open Official Manual
31

SD

RO

Summary dirty bit for FS, VS, and XS in the RV32 or low-half layout as visible to VS-mode.

SD (bit 31) — Summary dirty bit for FS, VS, and XS in the RV32 or low-half layout as visible to VS-mode.

What This Field Controls

  • - Summary dirty bit for FS, VS, and XS in the RV32 or low-half layout as visible to VS-mode.

Common Values

00

No FS, VS, or XS field is Dirty.

11

At least one of FS, VS, or XS is Dirty.

Open Official Manual
19

MXR

RW

Controls whether executable pages may also be read by loads under VS-stage paging.

MXR (bit 19) — Controls whether executable pages may also be read by loads under VS-stage paging.

What This Field Controls

  • - Controls whether executable pages may also be read by loads under VS-stage paging.

Common Values

0Disabled

Loads read only readable pages; MXR has no effect when paged virtual memory is not active.

1Enabled

Loads may read from readable or executable pages; MXR has no effect when paged virtual memory is not active.

Open Official Manual
18

SUM

RW

Controls whether VS-mode may access VU pages.

SUM (bit 18) — Controls whether VS-mode may access VU pages.

What This Field Controls

  • - Controls whether VS-mode may access VU pages.

Common Values

0Disabled

VS-mode accesses to pages with U=1 fault; SUM has no effect when paged virtual memory is not active.

1Enabled

VS-mode loads/stores may access pages with U=1; VS-mode still cannot execute instructions from user pages.

Open Official Manual
16:15

XS

RW

VS-visible summary of user extension state.

XS (bits 16:15) — VS-visible summary of user extension state.

What This Field Controls

  • - VS-visible summary of user extension state.

Common Values

0Off

The extension state is off; using the associated extension state traps or is unavailable.

1Initial

The extension state is in its initial state.

2Clean

The extension state matches the saved context in memory.

3Dirty

The extension state may have been modified and typically must be saved on context switch.

Open Official Manual
14:13

FS

RW

VS floating-point state.

FS (bits 14:13) — VS floating-point state.

What This Field Controls

  • - VS floating-point state.

Common Values

0Off

The extension state is off; using the associated extension state traps or is unavailable.

1Initial

The extension state is in its initial state.

2Clean

The extension state matches the saved context in memory.

3Dirty

The extension state may have been modified and typically must be saved on context switch.

Open Official Manual
10:9

VS

RW

VS vector state.

VS (bits 10:9) — VS vector state.

What This Field Controls

  • - VS vector state.

Common Values

0Off

The extension state is off; using the associated extension state traps or is unavailable.

1Initial

The extension state is in its initial state.

2Clean

The extension state matches the saved context in memory.

3Dirty

The extension state may have been modified and typically must be saved on context switch.

Open Official Manual
8

SPP

RW

Nominal privilege level before the VS trap.

SPP (bit 8) — Nominal privilege level before the VS trap.

What This Field Controls

  • - Nominal privilege level before the VS trap.

Common Values

0U

Previous privilege before the VS-mode trap was User; SRET returns to VU-mode.

1S

Previous privilege before the VS-mode trap was Supervisor; SRET returns to VS-mode.

Open Official Manual
6

UBE

RW

Controls endianness of VU-mode explicit memory accesses; may be a read-only copy of hstatus.VSBE.

UBE (bit 6) — Controls endianness of VU-mode explicit memory accesses; may be a read-only copy of hstatus.VSBE.

What This Field Controls

  • - Controls endianness of VU-mode explicit memory accesses; may be a read-only copy of hstatus.VSBE.

Common Values

0Little-endian

VU-mode explicit memory accesses are little-endian; instruction fetch is not affected by this bit.

1Big-endian

VU-mode explicit memory accesses are big-endian; instruction fetch is not affected by this bit.

Open Official Manual
5

SPIE

RW

Saved vsstatus.SIE before a VS trap.

SPIE (bit 5) — Saved vsstatus.SIE before a VS trap.

What This Field Controls

  • - Saved vsstatus.SIE before a VS trap.

Common Values

00

SIE was 0 before the VS-mode trap, or the saved post-return interrupt state is disabled.

11

SIE was 1 before the VS-mode trap and SRET can restore it under the rules.

Open Official Manual
1

SIE

RW

Supervisor global interrupt enable for VS-mode.

SIE (bit 1) — Supervisor global interrupt enable for VS-mode.

What This Field Controls

  • - Supervisor global interrupt enable for VS-mode.

Common Values

0Disabled

When currently running in VS-mode, global supervisor interrupts are disabled.

1Enabled

When currently running in VS-mode, global supervisor interrupts are enabled; delivery also depends on vsie/vsip.

Open Official Manual
Official Basis & Search Notes

vsstatus is a VS supervisor state or trap CSR. The separate CSR address is for M/HS-side management; when V=1, guest access to the corresponding supervisor CSR is substituted with VS state unless an extension specifies otherwise.

vsstatus address, access class, and width are checked against the official CSR tables: 0x200, HRW, VSXLEN.
The H extension specifies that, when V=1, access to the corresponding supervisor CSR is substituted with the VS CSR.
When writing, modify only officially defined fields; handle WARL, WLRL, WPRI, and reserved fields according to the official specification and implementation behavior.

What To Check First When Reading This CSR

  • - vsstatus's separate CSR address is in the official HRW access class; a VS/VU guest normally reaches VS state through the corresponding supervisor CSR alias.
  • - Before reading it, confirm that the defining extension such as H, AIA, Sstc, Smstateen, or Smcsrind is implemented.

Risk Checks Before Writing

  • - When writing vsstatus, modify only officially defined target fields and preserve WPRI, reserved, and unchanged fields.

Put It Back Into A Real Flow

1

M/HS software may access the VS copy through the separate CSR address.

2

When V=1, guest access to the corresponding supervisor CSR aliases to VS state; direct access to the separate VS CSR address raises a virtual-instruction exception.

3

Update only official fields and do not treat VS state as ordinary HS supervisor state.

FAQ

Can VS-mode directly access vsstatus's separate CSR address?

No. The H extension substitutes VS state for the corresponding supervisor CSR when V=1; direct access to the separate VS CSR address raises a virtual-instruction exception.

What does vsstatus mainly hold?

vsstatus holds VS supervisor status state, allowing the hypervisor to manage guest-supervisor trap, status, or execution context.