diff options
author | Marc Zyngier <maz@kernel.org> | 2025-04-25 17:42:49 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2025-05-19 11:36:21 +0100 |
commit | fc631df00c4cef4a95b25ac87842b9d1ec9ceaa1 (patch) | |
tree | bb20cd05165eb2dab1b09f07e1d9a471663f7798 | |
parent | 4bc0fe089840695538aff879e25efab2cdad22bd (diff) |
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>
-rw-r--r-- | arch/arm64/kvm/emulate-nested.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c index 3312aefa095e..e2a843675da9 100644 --- a/arch/arm64/kvm/emulate-nested.c +++ b/arch/arm64/kvm/emulate-nested.c @@ -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", |