Skip to content

Commit 1ad9767

Browse files
author
Marc Zyngier
committed
KVM: arm64: Add trap routing for GMID_EL1
HCR_EL2.TID5 is currently ignored by the trap routing infrastructure. Wire it in the routing table so that GMID_EL1, the sole register trapped by this bit, is correctly handled in the NV case. Link: https://patch.msgid.link/20260108173233.2911955-3-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 4a7fe84 commit 1ad9767

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

arch/arm64/kvm/emulate-nested.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ enum cgt_group_id {
7070
CGT_HCR_ENSCXT,
7171
CGT_HCR_TTLBIS,
7272
CGT_HCR_TTLBOS,
73+
CGT_HCR_TID5,
7374

7475
CGT_MDCR_TPMCR,
7576
CGT_MDCR_TPM,
@@ -308,6 +309,12 @@ static const struct trap_bits coarse_trap_bits[] = {
308309
.mask = HCR_TTLBOS,
309310
.behaviour = BEHAVE_FORWARD_RW,
310311
},
312+
[CGT_HCR_TID5] = {
313+
.index = HCR_EL2,
314+
.value = HCR_TID5,
315+
.mask = HCR_TID5,
316+
.behaviour = BEHAVE_FORWARD_RW,
317+
},
311318
[CGT_MDCR_TPMCR] = {
312319
.index = MDCR_EL2,
313320
.value = MDCR_EL2_TPMCR,
@@ -665,6 +672,7 @@ static const struct encoding_to_trap_config encoding_to_cgt[] __initconst = {
665672
SR_TRAP(SYS_CCSIDR2_EL1, CGT_HCR_TID2_TID4),
666673
SR_TRAP(SYS_CLIDR_EL1, CGT_HCR_TID2_TID4),
667674
SR_TRAP(SYS_CSSELR_EL1, CGT_HCR_TID2_TID4),
675+
SR_TRAP(SYS_GMID_EL1, CGT_HCR_TID5),
668676
SR_RANGE_TRAP(SYS_ID_PFR0_EL1,
669677
sys_reg(3, 0, 0, 7, 7), CGT_HCR_TID3),
670678
SR_TRAP(SYS_ICC_SGI0R_EL1, CGT_HCR_IMO_FMO_ICH_HCR_TC),

0 commit comments

Comments
 (0)