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 <[email protected]> Tested-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]>
1 parent 6d73076 commit c9150a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)