HCRX_EL2, Extended Hypervisor Configuration Register
The HCRX_EL2 characteristics are:
Purpose
Provides configuration controls for virtualization, including defining whether various operations are trapped to EL2.
Configuration
This register is present only when FEAT_HCX is implemented. Otherwise, direct accesses to HCRX_EL2 are UNDEFINED.
If EL2 is not implemented, this register is RES0 from EL3.
The bits in this register behave as if they are 0 for all purposes other than direct reads of the register if:
- EL2 is not enabled in the current Security state.
- SCR_EL3.HXEn is 0.
Attributes
HCRX_EL2 is a 64-bit register.
Field descriptions
The HCRX_EL2 bit assignments are:
63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
RES0 | |||||||||||||||||||||||||||||||
RES0 | FGTnXS | FnXS | EnASR | EnALS | EnAS0 | ||||||||||||||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Bits [63:5]
Reserved, RES0.
FGTnXS, bit [4]
When FEAT_XS is implemented:
When FEAT_XS is implemented:
Determines if the fine-grained traps in HFGITR_EL2 that apply to each of the TLBI maintenance instructions that are accessible at EL1 also apply to the corresponding TLBI maintenance instructions with the nXS qualifier.
FGTnXS | Meaning |
---|---|
0b0 |
The fine-grained trap in the HFGITR_EL2 that applies to a TLBI maintenance instruction at EL1 also applies to the corresponding TLBI instruction with the nXS qualifier at EL1. |
0b1 |
The fine-grained trap in the HFGITR_EL2 that applies to a TLBI maintenance instruction at EL1 does not apply to the corresponding TLBI instruction with the nXS qualifier at EL1. |
Otherwise:
Otherwise:
Reserved, RES0.
FnXS, bit [3]
When FEAT_XS is implemented:
When FEAT_XS is implemented:
Determines the behavior of TLBI instructions affected by the XS attribute.
This control bit also determines whether an AArch64 DSB instruction behaves as a DSB instruction with an nXS qualifier when executed at EL0 and EL1.
FnXS | Meaning |
---|---|
0b0 |
This control does not have any effect on the behavior of the TLBI maintenance instructions. |
0b1 | A TLBI maintenance instruction without the nXS qualifier executed at EL1 behaves in the same way as the corresponding TLBI maintenance instruction with the nXS qualifier. An AArch64 DSB instruction executed at EL1 or EL0 behaves in the same way as the corresponding DSB instruction with the nXS qualifier executed at EL1 or EL0. |
This bit is permitted to be cached in a TLB.
Otherwise:
Otherwise:
Reserved, RES0.
EnASR, bit [2]
When FEAT_LS64 is implemented:
When FEAT_LS64 is implemented:
When HCR_EL2.{E2H, TGE} != {1, 1}, traps execution of an ST64BV instruction at EL0 or EL1 to EL2.
EnASR | Meaning |
---|---|
0b0 | Execution of an ST64BV instruction at EL0 is trapped to EL2 if the execution is not trapped by SCTLR_EL1.EnASR. Execution of an ST64BV instruction at EL1 is trapped to EL2. |
0b1 |
This control does not cause any instructions to be trapped. |
A trap of an ST64BV instruction is reported using an ESR_ELx.EC value of 0x0A, with an ISS code of 0x0000000.
On a Warm reset, when EL3 is not implemented and EL2 is implemented, this field resets to 0.
Otherwise:
Otherwise:
Reserved, RES0.
EnALS, bit [1]
When FEAT_LS64 is implemented:
When FEAT_LS64 is implemented:
When HCR_EL2.{E2H, TGE} != {1, 1}, traps execution of an LD64B or ST64B instruction at EL0 or EL1 to EL2.
EnALS | Meaning |
---|---|
0b0 | Execution of an LD64B or ST64B instruction at EL0 is trapped to EL2 if the execution is not trapped by SCTLR_EL1.EnALS. Execution of an LD64B or ST64B instruction at EL1 is trapped to EL2. |
0b1 |
This control does not cause any instructions to be trapped. |
A trap of an LD64B or ST64B instruction is reported using an ESR_ELx.EC value of 0x0A, with an ISS code of 0x0000002.
On a Warm reset, when EL3 is not implemented and EL2 is implemented, this field resets to 0.
Otherwise:
Otherwise:
Reserved, RES0.
EnAS0, bit [0]
When FEAT_LS64 is implemented:
When FEAT_LS64 is implemented:
When HCR_EL2.{E2H, TGE} != {1, 1}, traps execution of an ST64BV0 instruction at EL0 or EL1 to EL2.
EnAS0 | Meaning |
---|---|
0b0 | Execution of an ST64BV0 instruction at EL0 is trapped to EL2 if the execution is not trapped by SCTLR_EL1.EnAS0. Execution of an ST64BV0 instruction at EL1 is trapped to EL2. |
0b1 |
This control does not cause any instructions to be trapped. |
A trap of an ST64BV0 instruction is reported using an ESR_ELx.EC value of 0x0A, with an ISS code of 0x0000001.
On a Warm reset, when EL3 is not implemented and EL2 is implemented, this field resets to 0.
Otherwise:
Otherwise:
Reserved, RES0.
Accessing the HCRX_EL2
Accesses to this register use the following encodings:
MRS <Xt>, HCRX_EL2
op0 | op1 | CRn | CRm | op2 |
---|---|---|---|---|
0b11 | 0b100 | 0b0001 | 0b0010 | 0b010 |
if PSTATE.EL == EL0 then UNDEFINED; elsif PSTATE.EL == EL1 then if EL2Enabled() && HCR_EL2.<NV2,NV> == '11' then return NVMem[0xA0]; elsif EL2Enabled() && HCR_EL2.NV == '1' then AArch64.SystemAccessTrap(EL2, 0x18); else UNDEFINED; elsif PSTATE.EL == EL2 then if Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && SCR_EL3.HXEn == '0' then UNDEFINED; elsif HaveEL(EL3) && SCR_EL3.HXEn == '0' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); else return HCRX_EL2; elsif PSTATE.EL == EL3 then return HCRX_EL2;
MSR HCRX_EL2, <Xt>
op0 | op1 | CRn | CRm | op2 |
---|---|---|---|---|
0b11 | 0b100 | 0b0001 | 0b0010 | 0b010 |
if PSTATE.EL == EL0 then UNDEFINED; elsif PSTATE.EL == EL1 then if EL2Enabled() && HCR_EL2.<NV2,NV> == '11' then NVMem[0xA0] = X[t]; elsif EL2Enabled() && HCR_EL2.NV == '1' then AArch64.SystemAccessTrap(EL2, 0x18); else UNDEFINED; elsif PSTATE.EL == EL2 then if Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && SCR_EL3.HXEn == '0' then UNDEFINED; elsif HaveEL(EL3) && SCR_EL3.HXEn == '0' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); else HCRX_EL2 = X[t]; elsif PSTATE.EL == EL3 then HCRX_EL2 = X[t];