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>
This commit is contained in:
Marc Zyngier
2025-04-25 17:42:49 +01:00
parent 4bc0fe0898
commit fc631df00c

View File

@@ -2485,6 +2485,18 @@ bool triage_sysreg_trap(struct kvm_vcpu *vcpu, int *sr_index)
}
break;
case HFGRTR2_GROUP:
fgtreg = is_read ? HFGRTR2_EL2 : HFGWTR2_EL2;
break;
case HDFGRTR2_GROUP:
fgtreg = is_read ? HDFGRTR2_EL2 : HDFGWTR2_EL2;
break;
case HFGITR2_GROUP:
fgtreg = HFGITR2_EL2;
break;
default:
/* Something is really wrong, bail out */
WARN_ONCE(1, "Bad FGT group (encoding %08x, config %016llx)\n",