Skip to content

Commit fc631df

Browse files
author
Marc Zyngier
committed
KVM: arm64: Add trap routing for FEAT_FGT2 registers
Similarly to the FEAT_FGT registers, pick the correct FEAT_FGT2 register when a sysreg trap indicates they could be responsible for the exception. Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 4bc0fe0 commit fc631df

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

arch/arm64/kvm/emulate-nested.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,6 +2485,18 @@ bool triage_sysreg_trap(struct kvm_vcpu *vcpu, int *sr_index)
24852485
}
24862486
break;
24872487

2488+
case HFGRTR2_GROUP:
2489+
fgtreg = is_read ? HFGRTR2_EL2 : HFGWTR2_EL2;
2490+
break;
2491+
2492+
case HDFGRTR2_GROUP:
2493+
fgtreg = is_read ? HDFGRTR2_EL2 : HDFGWTR2_EL2;
2494+
break;
2495+
2496+
case HFGITR2_GROUP:
2497+
fgtreg = HFGITR2_EL2;
2498+
break;
2499+
24882500
default:
24892501
/* Something is really wrong, bail out */
24902502
WARN_ONCE(1, "Bad FGT group (encoding %08x, config %016llx)\n",

0 commit comments

Comments
 (0)