]> Git Repo - linux.git/commitdiff
KVM: arm64: Enable FP8 support when available and configured
authorMarc Zyngier <[email protected]>
Tue, 20 Aug 2024 13:18:01 +0000 (14:18 +0100)
committerMarc Zyngier <[email protected]>
Tue, 27 Aug 2024 06:59:27 +0000 (07:59 +0100)
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 <[email protected]>
Tested-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Marc Zyngier <[email protected]>
arch/arm64/kvm/sys_regs.c

index 4c2f7c0af537ca9d9a1f01fb85c061392d818c65..51627add0a72e5c117facc5891f4875c1f6055d3 100644 (file)
@@ -4579,6 +4579,9 @@ void kvm_calculate_traps(struct kvm_vcpu *vcpu)
 
                if (kvm_has_feat(kvm, ID_AA64MMFR3_EL1, TCRX, IMP))
                        vcpu->arch.hcrx_el2 |= HCRX_EL2_TCR2En;
+
+               if (kvm_has_fpmr(kvm))
+                       vcpu->arch.hcrx_el2 |= HCRX_EL2_EnFPM;
        }
 
        if (test_bit(KVM_ARCH_FLAG_FGU_INITIALIZED, &kvm->arch.flags))
This page took 0.069857 seconds and 4 git commands to generate.