CSR Bit Fields

RISC-V hstatus CSR Register

Address 0x600Privilege HypervisorAccess HRW / HSXLENHypervisor and virtualization CSRs

hstatus is an HSXLEN hypervisor status CSR controlling VS-mode guest exception behavior, virtualization state, endianness, guest-external-interrupt selection, and optional pointer-masking state.

Field Map

Understand hstatus By Bit Fields

17 key fields
63:50

WPRI

WPRI

Reserved for future standard use; software should preserve written values and ignore reads.

WPRI (bits 63:50) — Reserved for future standard use; software should preserve written values and ignore reads.

What This Field Controls

  • - Reserved for future standard use; software should preserve written values and ignore reads.

Common Values

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

Open Official Manual
49:48

HUPMM

WARL

With Ssnpm, enables or disables pointer masking for HLV.*, HLVX.*, or HSV.* explicit accesses in U-mode performed as though in VU-mode; read-only zero without Ssnpm and on RV32.

HUPMM (bits 49:48) — With Ssnpm, enables or disables pointer masking for HLV.*, HLVX.*, or HSV.* explicit accesses in U-mode performed as though in VU-mode; read-only zero without Ssnpm and on RV32.

What This Field Controls

  • - With Ssnpm, enables or disables pointer masking for HLV.*, HLVX.*, or HSV.* explicit accesses in U-mode performed as though in VU-mode; read-only zero without Ssnpm and on RV32.

Common Values

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

Open Official Manual
47:34

WPRI

WPRI

Reserved for future standard use.

WPRI (bits 47:34) — Reserved for future standard use.

What This Field Controls

  • - Reserved for future standard use.

Common Values

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

Open Official Manual
33:32

VSXL

WARL

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
31:23

WPRI

WPRI

Reserved for future standard use.

WPRI (bits 31:23) — Reserved for future standard use.

What This Field Controls

  • - Reserved for future standard use.

Common Values

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

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
19:18

WPRI

WPRI

Reserved for future standard use.

WPRI (bits 19:18) — Reserved for future standard use.

What This Field Controls

  • - Reserved for future standard use.

Common Values

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

Open Official Manual
17:12

VGEIN

WLRL

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
11:10

WPRI

WPRI

Reserved for future standard use.

WPRI (bits 11:10) — Reserved for future standard use.

What This Field Controls

  • - Reserved for future standard use.

Common Values

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

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

WARL

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
4:0

WPRI

WPRI

Reserved for future standard use.

WPRI (bits 4:0) — Reserved for future standard use.

What This Field Controls

  • - Reserved for future standard use.

Common Values

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

Open Official Manual
Official Basis & Search Notes

hstatus is HS/M-side hypervisor status used to track and control VS-mode guest exception behavior. It is not a VS supervisor CSR copy; VS CSR substitution, trap entry/return, and hypervisor load/store rules determine its effects.

hstatus address 0x600, HRW access, and HSXLEN width come from the official Hypervisor CSR table; Figures 47 and 48 define RV32/RV64 layouts.
VSXL exists only when HSXLEN=64 and controls VSXLEN; when HSXLEN=32, VSXL does not exist and VSXLEN=32.
VTSR, VTW, and VTVM affect only VS-mode and raise virtual-instruction exceptions; VTW is additionally conditioned by mstatus.TW=0 and the bounded-time WFI rule.
VGEIN is a WLRL field selecting guest external interrupt sources 0..GEILEN; it may be read-only zero when GEILEN=0.
HUPMM is meaningful only on RV64 with Ssnpm implemented; without Ssnpm or on RV32 it is read-only zero.

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 extension is implemented; HUPMM is meaningful only on RV64 when Ssnpm 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; it does not trap HFENCE.VVMA/HINVAL.VVMA or direct vsatp accesses.