Skip to content

Commit d4db987

Browse files
author
Marc Zyngier
committed
KVM: arm64: Add predicate for FPMR support in a VM
As we are about to check for the advertisement of FPMR support to a guest in a number of places, add a predicate that will gate most of the support code for FPMR. 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 b556889 commit d4db987

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm64/include/asm/kvm_host.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,4 +1475,8 @@ void kvm_set_vm_id_reg(struct kvm *kvm, u32 reg, u64 val);
14751475
(pa + pi + pa3) == 1; \
14761476
})
14771477

1478+
#define kvm_has_fpmr(k) \
1479+
(system_supports_fpmr() && \
1480+
kvm_has_feat((k), ID_AA64PFR2_EL1, FPMR, IMP))
1481+
14781482
#endif /* __ARM64_KVM_HOST_H__ */

0 commit comments

Comments
 (0)