ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

vsstatus

T1 riscv register register
Virtual Supervisor Status
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (H)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeVS
ExtensionsH

Summary

The vsstatus register tracks and controls the hart's current operating state.

Syntax / Encoding

CSR 0x200 (VS-mode, RW)

Bitfields (12)

BitsFieldDescription
63SD*State Dirty* Read-only bit that summarizes whether any of the vsstatus.FS, <% if ext?(:V) %> vsstatus.VS, <% end %> or vsstatus.XS fields signal the presence of some dirty state (_i.e._, any of them hold the value 11). This bit is _not_ an alias of mstatus.SD since it only reflects the state visible to VS-mode (_e.g
33:32UXL*VU-mode XLEN* Sets the effective XLEN for VU-mode (0 = 32-bit, 1 = 64-bit, 2 = 128-bit). [when,"VUXLEN == 32"] Since the hart only supports VUXLEN==32, this is hardwired to 0. [when,"VUXLEN == 64"] Since the hart only supports VUXLEN==64, this is hardwired to 1.
23SPELPHolds the previous Expected Landing Pad (ELP) state when entering VS-mode from a trap, and is restored to ELP on SRET from VS-mode. Defined by the Zicfilp extension. Per the privileged architecture, accesses to sstatus.SPELP resolve to mstatus.SPELP when V=0, and to vsstatus.SPELP when V=1; the V=1 routing is handled
19MXR*Make eXecutable Readable* Makes it possible to read executable pages when loading from effective VU-mode or VS-mode (normally, executable pages are not readable). * When 1, load in effective VU-mode or VS-mode from pages marked readable *or executable* are allowed as long as the page is marked readable (or executa
18SUM*permit Supervisor Memory Access* Allows VS-mode to read user pages. Applies to the following loads and stores: * All loads and stores in VS-mode. * All loads and stores in M-mode when mstatus.MPRV == 1, mstatus.MPP == 1, and mstatus.MPV == 1 * Loads and stores generated by one of the hlv.*, hlvx.*, or hsv.* instruc
16:15XS*Custom (X) extension context Status* Summarizes the current state of any custom extension state. Either 0 - Off, 1 - Initial, 2 - Clean, 3 - Dirty. Since there are no custom extensions, this field is read-only 0.
14:13FS*Floating point context status* When 0, floating point instructions (from F and D extensions) in VS-mode or VU-mode are disabled, and cause ILLEGAL INSTRUCTION exceptions. Floating point instructions in all modes, including VS-mode and VU-mode, are similarly disabled when mstatus.FS is clear. When a floating point re
10:9VS*Vector context status* When 0, vector instructions (from the V extension) are disabled, and cause ILLEGAL INSTRUCTION exceptions. When a vector register or vector CSR is written, VS obtains the value 3. Values 1 and 2 are valid write values for software, but are not interpreted by hardware other than to possibly enab
8SPP*VS-mode Previous Privilege* Written with the prior nominal privilege level (_i.e._, 0 for VU-mode and 1 for VS-mode) when entering VS-mode from an exception/interrupt. Can also be written by software without immediate side-effect. On a return from an exception from VS-mode, the machine will enter the nominal privile
6UBE*VU-mode Big Endian* Controls the endianness of VU-mode (0 = little, 1 = big). [when,"VU_MODE_ENDIANNESS == 'little'"] Since the CPU does not support big endian, this is hardwired to 0. [when,"VU_MODE_ENDIANNESS == 'big'"] Since the CPU does not support big endian, this is hardwired to 1.
5SPIE*VS-mode Previous Interrupt Enable* Written by hardware in two cases: * Written with prior value of vsstatus.SIE when entering VS-mode from an exception/interrupt. * Written with the value 1 when returning from an exception in VS-mode (via the sret instruction). Can also be written by software without immediate side
1SIE*VS-mode Interrupt Enable* Written by hardware in two cases: * Written with the value 0 when entering VS-mode from an exception/interrupt. * Written with the prior value of vsstatus.SPIE when returning from an exception in VS-mode (via sret). Affects execution by: * When 0, all VS-mode interrupts are disabled when

Reference Notes

The vsstatus register tracks and controls the hart's current operating state.

It is VS-mode's version of `sstatus`, and substitutes for it when in VS-mode
(_i.e._, in VS-mode CSR address 0x100 is `vsstatus`, not `sstatus`).

Unlike the relationship between `sstatus` and `mstatus`, none of the bits in `vsstatus` are
aliases of another field.