Skip to content

Commit c9150a8

Browse files
author
Marc Zyngier
committed
KVM: arm64: Enable FP8 support when available and configured
If userspace has enabled FP8 support (by setting ID_AA64PFR2_EL1.FPMR to 1), let's enable the feature by setting HCRX_EL2.EnFPM for the vcpu. Reviewed-by: Mark Brown <broonie@kernel.org> Tested-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20240820131802.3547589-8-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 6d73076 commit c9150a8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

arch/arm64/kvm/sys_regs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4579,6 +4579,9 @@ void kvm_calculate_traps(struct kvm_vcpu *vcpu)
45794579

45804580
if (kvm_has_feat(kvm, ID_AA64MMFR3_EL1, TCRX, IMP))
45814581
vcpu->arch.hcrx_el2 |= HCRX_EL2_TCR2En;
4582+
4583+
if (kvm_has_fpmr(kvm))
4584+
vcpu->arch.hcrx_el2 |= HCRX_EL2_EnFPM;
45824585
}
45834586

45844587
if (test_bit(KVM_ARCH_FLAG_FGU_INITIALIZED, &kvm->arch.flags))

0 commit comments

Comments
 (0)