vsie

Virtual Supervisor Interrupt Enable

The vsie register is a VSXLEN-bit read/write register that is VS-mode’s version of supervisor CSR sie. When V=1, vsie substitutes for the usual sie, so instructions that normally read or modify sie actually access vsie instead. However, interrupts directed to HS-level continue to be indicated in the HS-level sip register, not in vsip, when V=1.

When bit 13 of hideleg is zero, vsie.LCOFIE is read-only zero. Else, vsie.LCOFIE is an alias of sie.LCOFIE. When bit 10 of hideleg is zero, vsie.SEIE is read-only zero. Else, vsie.SEIE is an alias of hie.VSEIE. When bit 6 of hideleg is zero, vsie.STIE is read-only zero. Else, vsie.STIE is an alias of hie.VSTIE. When bit 2 of hideleg is zero, vsie.SSIE is read-only zero. Else, vsie.SSIE is an alias of hie.VSSIE.

Attributes

Requirement

H

Defining extensions

H

Hypervisor

CSR Address

0x204

Virtual CSR Address

0x104

Length

* 32 when CSR[hstatus].VSXL == 0 * 64 when CSR[hstatus].VSXL == 1

Privilege Mode

VS

Format

This CSR format changes dynamically.

vsie Format when CSR[hstatus].VSXL == 0
Figure 1. vsie Format when CSR[hstatus].VSXL == 0
vsie Format when CSR[hstatus].VSXL == 1
Figure 2. vsie Format when CSR[hstatus].VSXL == 1

Field Summary

Name Location Type Reset Value

vsie.SSIE

1

RW-H

UNDEFINED_LEGAL

vsie.STIE

5

RW-H

UNDEFINED_LEGAL

vsie.SEIE

9

RW-H

UNDEFINED_LEGAL

vsie.LCOFIE

13

RW-H

UNDEFINED_LEGAL

Fields

SSIE

Location

1

Description

SSIE. Read-only zero when hideleg.VSSI is 0. Else, alias of hie.VSSIE.

Type

RW-H

Reset value

UNDEFINED_LEGAL

STIE

Location

5

Description

STIE. Read-only zero when hideleg.VSTI is 0. Else, alias of hie.VSTIE.

Type

RW-H

Reset value

UNDEFINED_LEGAL

SEIE

Location

9

Description

SEIE. Read-only zero when hideleg.VSEI is 0. Else, alias of hie.VSEIE.

Type

RW-H

Reset value

UNDEFINED_LEGAL

LCOFIE

Location

13

Description

LCOFIE. Read-only zero when hideleg.LCOFI is 0. Else, alias of sie.LCOFIE.

Type

RW-H

Reset value

UNDEFINED_LEGAL

Software write

This CSR may store a value that is different from what software attempts to write.

When a software write occurs (e.g., through csrrw), the following determines the written value:

SSIE = if (CSR[hideleg].VSSI == 1) {
  CSR[hie].VSSIE = csr_value.SSIE;
}

STIE = if (CSR[hideleg].VSTI == 1) {
  CSR[hie].VSTIE = csr_value.STIE;
}

SEIE = if (CSR[hideleg].VSEI == 1) {
  CSR[hie].VSEIE = csr_value.SEIE;
}

LCOFIE = if (CSR[hideleg].LCOFI == 1) {
  CSR[sie].LCOFIE = csr_value.LCOFIE;
}

Software read

This CSR may return a value that is different from what is stored in hardware.

XReg result = 0;
if (CSR[hideleg].VSSI == 1) {
  result[1] = CSR[hie].VSSIE;
}
if (CSR[hideleg].VSTI == 1) {
  result[5] = CSR[hie].VSTIE;
}
if (CSR[hideleg].VSEI == 1) {
  result[9] = CSR[hie].VSEIE;
}
if (CSR[hideleg].LCOFI == 1) {
  result[13] = CSR[sie].LCOFIE;
}
return result;