vsepc
Virtual supervisor exception program counter
- Address
0x241- 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 Exception Program Counter
Privileged spec: Virtual supervisor exception program counter
Description
Written with the PC of an instruction on an exception or interrupt taken in VS-mode.
Also controls where the hart jumps on an exception return from VS-mode.
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
PC | RV32 31-0 / RV64 63-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/vsepc.yaml
- csrrw, csrrs, csrrc (Zicsr instructions that access CSRs)