vsstatus
Virtual supervisor status register
- Address
0x200- Group
- Hypervisor and VS CSRs
- Privilege
HRW(privileged spec CSR listing, Virtual Supervisor Registers)- Access
- read/write; lowest privilege H (hypervisor, including VS CSRs)
- Address range
- Standard read/write
- Name in riscv-unified-db
- Virtual Supervisor Status
Privileged spec: Virtual supervisor status register
Description
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.
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
SD | RV32 31 / RV64 63 | RO-H | State Dirty Read-only bit that summarizes whether any of the
This bit is not an alias of |
UXL | 33-32 | VU-mode XLEN Sets the effective XLEN for VU-mode (0 = 32-bit, 1 = 64-bit, 2 = 128-bit). Since the hart only supports VUXLEN==32, this is hardwired to 0. Since the hart only supports VUXLEN==64, this is hardwired to 1. | |
SPELP | 23 | RW-H | VS-mode Previous Expected Landing Pad state. Holds the previous Expected Landing Pad ( Defined by the Zicfilp extension. Per the privileged architecture, accesses to Encoded as:
|
MXR | 19 | RW | 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).
'vsstatus.MXR' affects all loads that operate under effective VU-mode or VS-mode:
|
SUM | 18 | RW | permit Supervisor Memory Access Allows VS-mode to read user pages. Applies to the following loads and stores:
When |
XS | 16-15 | RO | 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. |
FS | 14-13 | RW-H | 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 When a floating point register, or the Values 1 and 2 are valid write values for software, but are not interpreted by hardware other than to possibly enable a previously-disabled floating point unit. |
VS | 10-9 | RW-H | 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 enable a previously-disabled vector unit. |
SPP | 8 | RW-H | 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 privilege level
stored in |
UBE | 6 | VU-mode Big Endian Controls the endianness of VU-mode (0 = little, 1 = big). Since the CPU does not support big endian, this is hardwired to 0. Since the CPU does not support big endian, this is hardwired to 1. | |
SPIE | 5 | RW-H | VS-mode Previous Interrupt Enable Written by hardware in two cases:
Can also be written by software without immediate side effect. Other than serving as a record of nested traps as described above, |
SIE | 1 | RW-H | VS-mode Interrupt Enable Written by hardware in two cases:
Affects execution by:
|
Fields from riscv-unified-db; field types computed by IDL functions there are not shown.
Specification and related pages
- The RISC-V Instruction Set Manual, Volume II: CSR listing (src/priv/csrs.adoc)
- riscv-opcodes csrs.csv
- riscv-unified-db: spec/std/isa/csr/vsstatus.yaml
- csrrw, csrrs, csrrc (Zicsr instructions that access CSRs)