CSR Bit Fields

RISC-V hstatus CSR Register

Address 0x600Privilege HypervisorAccess HRW / HSXLENHypervisor and virtualization CSRs

hstatus is an HSXLEN-bit hypervisor status CSR controlling exception and virtualization state for a VS-mode guest.

Bit Overview
bit 3 = only bit 3; bits 12..11 = bits 12 down to 11
MSBLSB
Reserved63:34Reserved4:0
Field Map

Understand hstatus By Bit Fields

10 key fields
33:32

VSXL

RW

On RV64, controls the effective XLEN for VS-mode.

VSXL (bits 33:32) — On RV64, controls the effective XLEN for VS-mode.

What This Field Controls

  • - On RV64, controls the effective XLEN for VS-mode.

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
22

VTSR

RW

Controls whether VS-mode SRET raises a virtual-instruction exception.

VTSR (bit 22) — Controls whether VS-mode SRET raises a virtual-instruction exception.

What This Field Controls

  • - Controls whether VS-mode SRET raises a virtual-instruction exception.

Common Values

0Disabled

VS-mode SRET is not intercepted by VTSR.

1Enabled

VS-mode SRET raises a virtual-instruction exception.

Open Official Manual
21

VTW

RW

Controls virtual-instruction exception behavior for VS-mode WFI.

VTW (bit 21) — Controls virtual-instruction exception behavior for VS-mode WFI.

What This Field Controls

  • - Controls virtual-instruction exception behavior for VS-mode WFI.

Common Values

0Disabled

VS-mode WFI is not intercepted by VTW.

1Enabled

VS-mode WFI may raise a virtual-instruction exception under the bounded-time rule.

Open Official Manual
20

VTVM

RW

Controls VS-mode access to satp or address-translation fence instructions.

VTVM (bit 20) — Controls VS-mode access to satp or address-translation fence instructions.

What This Field Controls

  • - Controls VS-mode access to satp or address-translation fence instructions.

Common Values

0Disabled

VS-mode may access satp and execute related address-translation fences subject to other rules.

1Enabled

VS-mode access to satp or execution of SFENCE.VMA/SINVAL.VMA raises a virtual-instruction exception.

Open Official Manual
17:12

VGEIN

RW

Selects the guest external interrupt source for VS-level external interrupts; when GEILEN=0 or the value is greater than GEILEN, it does not represent a valid guest source.

VGEIN (bits 17:12) — Selects the guest external interrupt source for VS-level external interrupts; when GEILEN=0 or the value is greater than GEILEN, it does not represent a valid guest source.

What This Field Controls

  • - Selects the guest external interrupt source for VS-level external interrupts; when GEILEN=0 or the value is greater than GEILEN, it does not represent a valid guest source.

Common Values

0None selected

No guest external interrupt source is selected for VS-level external interrupts; if GEILEN=0, no valid guest source exists to select.

1..GEILENGuest source

Selects the corresponding numbered guest external interrupt source; only 1..GEILEN denotes a valid implemented source, and values greater than GEILEN do not represent a valid guest source.

Open Official Manual
9

HU

RW

Controls whether hypervisor load/store instructions may be used in U-mode.

HU (bit 9) — Controls whether hypervisor load/store instructions may be used in U-mode.

What This Field Controls

  • - Controls whether hypervisor load/store instructions may be used in U-mode.

Common Values

0Disabled

U-mode execution of hypervisor load/store instructions raises an illegal-instruction exception.

1Enabled

U-mode may execute hypervisor load/store instructions the same as HS-mode.

Open Official Manual
8

SPVP

RW

Records or controls effective privilege for virtual-machine load/store instructions.

SPVP (bit 8) — Records or controls effective privilege for virtual-machine load/store instructions.

What This Field Controls

  • - Records or controls effective privilege for virtual-machine load/store instructions.

Common Values

0VU

Virtual-machine load/store instructions use VU effective privilege.

1VS

Virtual-machine load/store instructions use VS effective privilege.

Open Official Manual
7

SPV

RW

Records virtualization mode at a trap into HS.

SPV (bit 7) — Records virtualization mode at a trap into HS.

What This Field Controls

  • - Records virtualization mode at a trap into HS.

Common Values

00

V was 0 before the trap into HS.

11

V was 1 before the trap into HS; SRET can restore virtualization mode under the rules.

Open Official Manual
6

GVA

RW

Indicates whether stval holds a guest virtual address.

GVA (bit 6) — Indicates whether stval holds a guest virtual address.

What This Field Controls

  • - Indicates whether stval holds a guest virtual address.

Common Values

00

The address in stval is not a guest virtual address.

11

The address in stval is a guest virtual address.

Open Official Manual
5

VSBE

RW

Controls endianness for VS-mode explicit accesses and implicit VS-stage page-table accesses.

VSBE (bit 5) — Controls endianness for VS-mode explicit accesses and implicit VS-stage page-table accesses.

What This Field Controls

  • - Controls endianness for VS-mode explicit accesses and implicit VS-stage page-table accesses.

Common Values

0Little-endian

VS-mode explicit memory accesses and VS-stage memory-management implicit accesses are little-endian.

1Big-endian

VS-mode explicit memory accesses and VS-stage memory-management implicit accesses are big-endian.

Open Official Manual
Official Basis & Search Notes

hstatus is a hypervisor status CSR. It is HS/M-side hypervisor state, not a VS supervisor CSR copy; guest access is governed by the H extension and relevant state-enable, AIA, Sstc, or Smcsrind rules.

hstatus address, access class, and width are checked against the official CSR tables: 0x600, HRW, HSXLEN.
VSXL controls VSXLEN; VTSR, VTW, and VTVM cause virtual-instruction exceptions for related VS-mode operations.
SPV, SPVP, GVA, and VGEIN are used on trap and guest-external-interrupt paths.
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

  • - hstatus is a Hypervisor-level CSR; its separate address is in the official HRW access class.
  • - Guest/VS software does not reach this H-level CSR through a supervisor CSR alias; access is controlled by the H extension and relevant optional-extension rules.

Risk Checks Before Writing

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

Put It Back Into A Real Flow

1

Confirm the current software is in an M/HS context that may access Hypervisor CSRs.

2

Confirm that the H, AIA, Sstc, Smstateen, Smcsrind, or other defining extension is implemented.

3

Read or write only official fields; whether guest-related access succeeds or traps is controlled by the corresponding extension rules and state-enable state.

FAQ

Can hstatus be accessed through a supervisor CSR alias?

Do not treat hstatus as a VS CSR copy. It is an H-level CSR; whether guest/VS access to related functionality traps is defined by the H extension and the relevant optional extension.

What does hstatus.VTVM control?

When VTVM=1, VS-mode execution of SFENCE.VMA/SINVAL.VMA or access to satp raises a virtual-instruction exception.