CSR Bit Fields

RISC-V vstopi CSR Register

Address 0xEB0Privilege Hypervisor direct / VS aliasAccess HRO / VSXLENHypervisor and virtualization CSRs

vstopi is an AIA-defined VSXLEN read-only CSR reporting the highest-priority pending-and-enabled VS-level interrupt; it reads zero when no candidate interrupt qualifies.

Field Map

Understand vstopi By Bit Fields

4 key fields
VSXLEN-1:28

Reserved

RO0

Reserved bits; read as zero.

Reserved (bits VSXLEN-1:28) — Reserved bits; read as zero.

What This Field Controls

  • - Reserved bits; read as zero.

Common Values

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

Open Official Manual
27:16

IID

RO

Interrupt identity of the highest-priority VS-level interrupt reported by vstopi.

IID (bits 27:16) — Interrupt identity of the highest-priority VS-level interrupt reported by vstopi.

What This Field Controls

  • - Interrupt identity of the highest-priority VS-level interrupt reported by vstopi.

Common Values

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

Open Official Manual
15:8

Reserved

RO0

Reserved bits; read as zero.

Reserved (bits 15:8) — Reserved bits; read as zero.

What This Field Controls

  • - Reserved bits; read as zero.

Common Values

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

Open Official Manual
7:0

IPRIO

RO

Priority value for the reported interrupt; when hvictl.IPRIOM=0, nonzero vstopi reports IPRIO=1, otherwise AIA priority rules produce 1..255 or a boundary value.

IPRIO (bits 7:0) — Priority value for the reported interrupt; when hvictl.IPRIOM=0, nonzero vstopi reports IPRIO=1, otherwise AIA priority rules produce 1..255 or a boundary value.

What This Field Controls

  • - Priority value for the reported interrupt; when hvictl.IPRIOM=0, nonzero vstopi reports IPRIO=1, otherwise AIA priority rules produce 1..255 or a boundary value.

Common Values

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

Open Official Manual
Official Basis & Search Notes

vstopi is the AIA VS-level top-interrupt CSR. It reports only the highest-priority VS-level interrupt that is both pending and enabled; under AIA, a VS-level interrupt is pending if and only if vstopi is nonzero.

The AIA CSR table gives vstopi address 0xEB0, HRO access, and VSXLEN width.
vstopi has the same format as stopi: bits 27:16 are IID, bits 7:0 are IPRIO, and all other bits are reserved and read as zero.
Candidate interrupts come from vsip/vsie, hstatus.VGEIN, vstopei, hvictl.VTI/IID/DPR/IPRIO, and hviprio1/hviprio2; vstopi is zero when no candidate qualifies.
mstateen0.AIA and hstateen0.AIA can restrict lower-privilege or VM access to vstopi; hvictl affects vstopi but does not change mip/sip/hip/vsip.

What To Check First When Reading This CSR

  • - vstopi's separate CSR address is in the AIA HRO access class; VS-mode observes VS top-interrupt state through the stopi supervisor CSR alias.
  • - Before reading it, confirm that H and AIA are implemented; if Smstateen/Ssstateen is present, also confirm that mstateen0.AIA and hstateen0.AIA do not block the relevant access.

Risk Checks Before Writing

  • - vstopi is read-only; software should not write it.

Put It Back Into A Real Flow

1

Confirm AIA is implemented and whether an IMSIC or relevant guest interrupt file exists.

2

Interpret fields according to AIA definitions for top interrupt, enable, pending, priority, or delivery control.

3

Check mstateen0/hstateen0 access control for the related AIA state.

FAQ

What AIA state does vstopi represent?

vstopi belongs to AIA VS-level top-interrupt state and reports the IID/IPRIO of the highest-priority pending-and-enabled VS-level interrupt.

Can state-enable CSRs control access to vstopi?

Yes. AIA specifies that mstateen0.AIA and hstateen0.AIA control lower-privilege or VM access to AIA CSRs such as vstopi; vstopi's IMSIC external-interrupt candidate also depends on the guest interrupt file selected by hstatus.VGEIN and on vstopei state.