arm64/sve: Preserve SVE registers around kernel-mode NEON use
authorDave Martin <Dave.Martin@arm.com>
Tue, 31 Oct 2017 15:51:11 +0000 (15:51 +0000)
committerWill Deacon <will.deacon@arm.com>
Fri, 3 Nov 2017 15:24:18 +0000 (15:24 +0000)
commit1bd3f93641ec710015fcb3badca07dacd58c91d3
treea31ad7c9c719074a2e230a8cfdd694858aa7acf2
parent2e0f2478ea37eba945bee007884a2988b8f7d332
arm64/sve: Preserve SVE registers around kernel-mode NEON use

Kernel-mode NEON will corrupt the SVE vector registers, due to the
way they alias the FPSIMD vector registers in the hardware.

This patch ensures that any live SVE register content for the task
is saved by kernel_neon_begin().  The data will be restored in the
usual way on return to userspace.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/fpsimd.c