vscause
Virtual supervisor trap cause
- Address
0x242- 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 Cause
Privileged spec: Virtual supervisor trap cause
Description
Reports the cause of the latest exception taken in VS-mode.
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
INT | RV32 31 / RV64 63 | RW-RH | Written by hardware when a trap is taken into VS-mode. When set, the last exception was caused by an asynchronous Interrupt.
If If |
CODE | RV32 30-0 / RV64 62-0 | RW-RH |
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/vscause.yaml
- csrrw, csrrs, csrrc (Zicsr instructions that access CSRs)