CSR Bit Fields

RISC-V hstateen0 CSR Register

Address 0x60CPrivilege HypervisorAccess HRW / HSXLENHypervisor and virtualization CSRs

hstateen0 is a hypervisor state-enable CSR.

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

Understand hstateen0 By Bit Fields

8 key fields
63

C

RW

Controls VM access to custom state.

C (bit 63) — Controls VM access to custom state.

What This Field Controls

  • - Controls VM access to custom state.

Common Values

0Disabled

The VM cannot access the corresponding custom state; related accesses trap under state-enable rules.

1Enabled

Allows the VM to access the corresponding custom state.

Open Official Manual
60

CSRIND

RW

Controls VM access to siselect/sireg* aliases, which reach VS indirect CSR state.

CSRIND (bit 60) — Controls VM access to siselect/sireg* aliases, which reach VS indirect CSR state.

What This Field Controls

  • - Controls VM access to siselect/sireg* aliases, which reach VS indirect CSR state.

Common Values

0Disabled

The VM cannot access VS indirect CSR alias state; related accesses trap under state-enable rules.

1Enabled

Allows the VM to access VS indirect CSR alias state.

Open Official Manual
59

AIA

RW

Controls VM access to AIA state not covered by CSRIND or IMSIC.

AIA (bit 59) — Controls VM access to AIA state not covered by CSRIND or IMSIC.

What This Field Controls

  • - Controls VM access to AIA state not covered by CSRIND or IMSIC.

Common Values

0Disabled

The VM cannot access the AIA state controlled by this bit; related accesses trap under state-enable rules.

1Enabled

Allows the VM to access the AIA state controlled by this bit.

Open Official Manual
58

IMSIC

RW

Controls VM access to guest IMSIC state, including stopei, which reaches vstopei.

IMSIC (bit 58) — Controls VM access to guest IMSIC state, including stopei, which reaches vstopei.

What This Field Controls

  • - Controls VM access to guest IMSIC state, including stopei, which reaches vstopei.

Common Values

0Disabled

The VM cannot access guest IMSIC state; related accesses trap under state-enable rules.

1Enabled

Allows the VM to access guest IMSIC state.

Open Official Manual
57

CONTEXT

RW

Controls VM access to context state such as scontext.

CONTEXT (bit 57) — Controls VM access to context state such as scontext.

What This Field Controls

  • - Controls VM access to context state such as scontext.

Common Values

0Disabled

The VM cannot access context state such as scontext; related accesses trap under state-enable rules.

1Enabled

Allows the VM to access context state such as scontext.

Open Official Manual
56

P1P13

RW

Controls access to Privileged 1.13 related state; confirm portable Hypervisor-side meaning against the current official extension and implementation.

P1P13 (bit 56) — Controls access to Privileged 1.13 related state; confirm portable Hypervisor-side meaning against the current official extension and implementation.

What This Field Controls

  • - Controls access to Privileged 1.13 related state; confirm portable Hypervisor-side meaning against the current official extension and implementation.

Common Values

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

Open Official Manual
55

ENVCFG

RW

Controls VM access to environment-configuration state such as senvcfg.

ENVCFG (bit 55) — Controls VM access to environment-configuration state such as senvcfg.

What This Field Controls

  • - Controls VM access to environment-configuration state such as senvcfg.

Common Values

0Disabled

The VM cannot access environment-configuration state such as senvcfg; related accesses trap under state-enable rules.

1Enabled

Allows the VM to access environment-configuration state such as senvcfg.

Open Official Manual
0

SE0

RW

Controls VS/VU access to sstateen0 and the next-level state-enable state.

SE0 (bit 0) — Controls VS/VU access to sstateen0 and the next-level state-enable state.

What This Field Controls

  • - Controls VS/VU access to sstateen0 and the next-level state-enable state.

Common Values

0Disabled

VS/VU cannot access sstateen0 or next-level state-enable state; related accesses trap under Smstateen/Ssstateen state-enable rules.

1Enabled

Allows VS/VU to access sstateen0 or next-level state-enable state when other access rules also permit it.

Open Official Manual
Official Basis & Search Notes

hstateen0 is a hypervisor state-enable 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.

hstateen0 address, access class, and width are checked against the official CSR tables: 0x60C, HRW, HSXLEN.
State-enable CSRs control lower-privilege or VM access to extension state; they do not affect M-mode access.
hstateen0 has official CSRIND, AIA, IMSIC, CONTEXT, ENVCFG, and related bits.
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

  • - hstateen0 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 hstateen0, 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 hstateen0 be accessed through a supervisor CSR alias?

Do not treat hstateen0 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 do the AIA/IMSIC/CSRIND bits in hstateen0 control?

They control VM access to AIA, guest IMSIC, and indirect CSR alias state, respectively.