hedeleg
Hypervisor Exception Delegation
Controls exception delegation from HS-mode to VS-mode.
By default, all traps at any privilege level are handled in M-mode, though M-mode usually uses
the medeleg and mideleg CSRs to delegate some traps to HS-mode. The hedeleg and hideleg
CSRs allow these traps to be further delegated to a VS-mode guest; their layout is the same as
medeleg and mideleg.
A synchronous trap that has been delegated to HS-mode (using medeleg) is further delegated to VS-mode if V=1 before the trap and the corresponding hedeleg bit is set. Each bit of hedeleg shall be either writable or read-only zero. Many bits of hedeleg are required specifically to be writable or zero. Bit 0, corresponding to instruction address misaligned exceptions, must be writable if IALIGN=32.
Requiring that certain bits of hedeleg be writable reduces some of the burden on a hypervisor to handle variations of implementation. |
Field Summary
Name | Location | Type | Reset Value |
---|---|---|---|
0 |
RW |
UNDEFINED_LEGAL |
|
1 |
RW |
UNDEFINED_LEGAL |
|
2 |
RW |
UNDEFINED_LEGAL |
|
3 |
RW |
UNDEFINED_LEGAL |
|
4 |
RW |
UNDEFINED_LEGAL |
|
5 |
RW |
UNDEFINED_LEGAL |
|
6 |
RW |
UNDEFINED_LEGAL |
|
7 |
RW |
UNDEFINED_LEGAL |
|
8 |
RW |
UNDEFINED_LEGAL |
|
9 |
RO |
0 |
|
10 |
RO |
0 |
|
11 |
RO |
0 |
|
12 |
RW |
UNDEFINED_LEGAL |
|
13 |
RW |
UNDEFINED_LEGAL |
|
15 |
RW |
UNDEFINED_LEGAL |
|
20 |
RO |
0 |
|
21 |
RO |
0 |
|
22 |
RO |
0 |
|
23 |
RO |
0 |
Fields
IAM
- Location
-
hedeleg[0]
- Description
-
Instruction Address Misaligned
Controls delegation of Instruction Address Misaligned exceptions to VS-mode.
See medeleg.IAM for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
IAF
- Location
-
hedeleg[1]
- Description
-
Instruction Access Fault
Controls delegation of Instruction Access Fault exceptions to VS-mode.
See medeleg.IAF for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
II
- Location
-
hedeleg[2]
- Description
-
Illegal Instruction
Controls delegation of Illegal Instruction exceptions to VS-mode.
See medeleg.II for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
B
- Location
-
hedeleg[3]
- Description
-
Breakpoint
Controls delegation of Breakpoint exceptions to VS-mode.
See medeleg.B for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
LAM
- Location
-
hedeleg[4]
- Description
-
Load Address Misaligned
Controls delegation of Load Address Misaligned exceptions to VS-mode.
See medeleg.LAM for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
LAF
- Location
-
hedeleg[5]
- Description
-
Load Access Fault
Controls delegation of Load Access Fault exceptions to VS-mode.
See medeleg.LAF for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
SAM
- Location
-
hedeleg[6]
- Description
-
Store/AMO Address Misaligned
Controls delegation of Store/AMO Address Misaligned exceptions to VS-mode.
See medeleg.SAM for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
SAF
- Location
-
hedeleg[7]
- Description
-
Store/AMO Access Fault
Controls delegation of Store/AMO Access Fault exceptions to VS-mode.
See medeleg.SAF for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
EU
- Location
-
hedeleg[8]
- Description
-
Environment Call from VU-mode
Controls delegation of Enviornment Call from VU-mode exceptions to VS-mode.
See medeleg.EU for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
ES
- Location
-
hedeleg[9]
- Description
-
Environment Call from HS-mode
Enviornment Call from HS-mode exceptions cannot be delegated to VS-mode, so this field is read-only 0.
See medeleg.ES for details.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
EVS
- Location
-
hedeleg[10]
- Description
-
Environment Call from VS-mode
Enviornment Call from VS-mode exceptions cannot be delegated to VS-mode, so this field is read-only 0.
See medeleg.EVS for details.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
EM
- Location
-
hedeleg[11]
- Description
-
Environment Call from M-mode
Enviornment Call from M-mode exceptions cannot be delegated to VS-mode, so this field is read-only 0.
See medeleg.EM for details.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
IPF
- Location
-
hedeleg[12]
- Description
-
Instruction Page Fault
Controls delegation of Instruction Page Fault exceptions to VS-mode.
See medeleg.IPF for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
LPF
- Location
-
hedeleg[13]
- Description
-
Load Page Fault
Controls delegation of Load Page Fault exceptions to VS-mode.
See medeleg.LPF for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
SPF
- Location
-
hedeleg[15]
- Description
-
Store/AMO Page Fault
Controls delegation of Store/AMO Page Fault exceptions to VS-mode.
See medeleg.SPF for details.
- Type
RW |
Read-Write Field is writable by software. Any value that fits in the field is acceptable and shall be retained for subsequent reads. |
- Reset value
-
UNDEFINED_LEGAL
IGPF
- Location
-
hedeleg[20]
- Description
-
Instruction Guest Page Fault
Instruction Guest Page Fault exceptions cannot be delegated to VS-mode, so this field is read-only 0.
See medeleg.IGPF for details.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
LGPF
- Location
-
hedeleg[21]
- Description
-
Load Guest Page Fault
Load Guest Page Fault exceptions cannot be delegated to VS-mode, so this field is read-only 0.
See medeleg.LGPF for details.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
VI
- Location
-
hedeleg[22]
- Description
-
Virtual Instruction
Virtual Instruction exceptions cannot be delegated to VS-mode, so this field is read-only 0.
See medeleg.VI for details.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0
SGPF
- Location
-
hedeleg[23]
- Description
-
Store/AMO Guest Page Fault
Store/AMO Guest Page Fault exceptions cannot be delegated to VS-mode, so this field is read-only 0.
See medeleg.SGPF for details.
- Type
RO |
Read-Only Field has a hardwired value that does not change. Writes to an RO field are ignored. |
- Reset value
-
0