CSR Bit Fields

RISC-V htval CSR Register

Address 0x643Privilege HypervisorAccess HRW / HSXLENHypervisor and virtualization CSRs

htval is a Hypervisor trap-value CSR.

Field Map

Understand htval By Bit Fields

1 key fields
HSXLEN-1:0

GUEST_PHYSICAL_ADDRESS_OR_TRAP_AUXILIARY_VALUE

RW

The guest physical address or trap auxiliary value of htval.

GUEST_PHYSICAL_ADDRESS_OR_TRAP_AUXILIARY_VALUE (bits HSXLEN-1:0) — The guest physical address or trap auxiliary value of htval.

What This Field Controls

  • - The guest physical address or trap auxiliary value of htval.

Common Values

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

Open Official Manual
Official Basis & Search Notes

htval is a Hypervisor trap-value 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.

htval address, access class, and width are checked against the official CSR tables: 0x643, HRW, HSXLEN.
htval fields are interpreted by the corresponding Hypervisor extension section; unimplemented fields must not be treated as fixed writable 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

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

Do not treat htval 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.