arm64: Support systems without FP/ASIMD
The arm64 kernel assumes that FP/ASIMD units are always present and accesses the FP/ASIMD specific registers unconditionally. This could cause problems when they are absent. This patch adds the support for kernel handling systems without FP/ASIMD by skipping the register access within the kernel. For kvm, we trap the accesses to FP/ASIMD and inject an undefined instruction exception to the VM. The callers of the exported kernel_neon_begin_partial() should make sure that the FP/ASIMD is supported. Cc: Will Deacon <will.deacon@arm.com> Cc: Christoffer Dall <christoffer.dall@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by:Suzuki K Poulose <suzuki.poulose@arm.com> Reviewed-by:
Marc Zyngier <marc.zyngier@arm.com> [catalin.marinas@arm.com: add comment on the ARM64_HAS_NO_FPSIMD conflict and the new location] Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
Showing
- arch/arm64/include/asm/cpufeature.h 11 additions, 1 deletionarch/arm64/include/asm/cpufeature.h
- arch/arm64/include/asm/neon.h 2 additions, 1 deletionarch/arm64/include/asm/neon.h
- arch/arm64/kernel/cpufeature.c 15 additions, 0 deletionsarch/arm64/kernel/cpufeature.c
- arch/arm64/kernel/fpsimd.c 14 additions, 0 deletionsarch/arm64/kernel/fpsimd.c
- arch/arm64/kvm/handle_exit.c 11 additions, 0 deletionsarch/arm64/kvm/handle_exit.c
- arch/arm64/kvm/hyp/hyp-entry.S 8 additions, 1 deletionarch/arm64/kvm/hyp/hyp-entry.S
- arch/arm64/kvm/hyp/switch.c 4 additions, 1 deletionarch/arm64/kvm/hyp/switch.c
Please register or sign in to comment