Skip to content

Commit b17d8aa

Browse files
Marc Zyngieroupton
authored andcommitted
KVM: arm64: Drop bogus CPTR_EL2.E0POE trap routing
It took me some time to realise it, but CPTR_EL2.E0POE does not apply to a guest, only to EL0 when InHost(). And when InHost(), CPCR_EL2 is mapped to CPACR_EL1, maning that the E0POE bit naturally takes effect without any trap. To sum it up, this trap bit is better left ignored, we will never have to hanedle it. Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent b9ed7e5 commit b17d8aa

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

arch/arm64/kvm/emulate-nested.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ enum cgt_group_id {
7979
CGT_MDCR_E2TB,
8080
CGT_MDCR_TDCC,
8181

82-
CGT_CPACR_E0POE,
8382
CGT_CPTR_TAM,
8483
CGT_CPTR_TCPAC,
8584

@@ -362,12 +361,6 @@ static const struct trap_bits coarse_trap_bits[] = {
362361
.mask = MDCR_EL2_TDCC,
363362
.behaviour = BEHAVE_FORWARD_ANY,
364363
},
365-
[CGT_CPACR_E0POE] = {
366-
.index = CPTR_EL2,
367-
.value = CPACR_ELx_E0POE,
368-
.mask = CPACR_ELx_E0POE,
369-
.behaviour = BEHAVE_FORWARD_ANY,
370-
},
371364
[CGT_CPTR_TAM] = {
372365
.index = CPTR_EL2,
373366
.value = CPTR_EL2_TAM,
@@ -1141,7 +1134,6 @@ static const struct encoding_to_trap_config encoding_to_cgt[] __initconst = {
11411134
SR_TRAP(SYS_AMEVTYPER1_EL0(13), CGT_CPTR_TAM),
11421135
SR_TRAP(SYS_AMEVTYPER1_EL0(14), CGT_CPTR_TAM),
11431136
SR_TRAP(SYS_AMEVTYPER1_EL0(15), CGT_CPTR_TAM),
1144-
SR_TRAP(SYS_POR_EL0, CGT_CPACR_E0POE),
11451137
/* op0=2, op1=1, and CRn<0b1000 */
11461138
SR_RANGE_TRAP(sys_reg(2, 1, 0, 0, 0),
11471139
sys_reg(2, 1, 7, 15, 7), CGT_CPTR_TTA),

0 commit comments

Comments
 (0)