summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/uapi
diff options
context:
space:
mode:
authorDave Martin2017-10-31 16:51:12 +0100
committerWill Deacon2017-11-03 16:24:18 +0100
commitfdfa976cae5cbd46aa4b4f9e554a93c9f8b35c62 (patch)
treea567030512f04e995ecb7627b39517033fef61e3 /arch/arm64/include/uapi
parentarm64/sve: Preserve SVE registers around kernel-mode NEON use (diff)
downloadkernel-qcow2-linux-fdfa976cae5cbd46aa4b4f9e554a93c9f8b35c62.tar.gz
kernel-qcow2-linux-fdfa976cae5cbd46aa4b4f9e554a93c9f8b35c62.tar.xz
kernel-qcow2-linux-fdfa976cae5cbd46aa4b4f9e554a93c9f8b35c62.zip
arm64/sve: Preserve SVE registers around EFI runtime service calls
The EFI runtime services ABI allows EFI to make free use of the FPSIMD registers during EFI runtime service calls, subject to the callee-save requirements of the AArch64 procedure call standard. However, the SVE architecture allows upper bits of the SVE vector registers to be zeroed as a side-effect of FPSIMD V-register writes. This means that the SVE vector registers must be saved in their entirety in order to avoid data loss: non-SVE-aware EFI implementations cannot restore them correctly. The non-IRQ case is already handled gracefully by kernel_neon_begin(). For the IRQ case, this patch allocates a suitable per-CPU stash buffer for the full SVE register state and uses it to preserve the affected registers around EFI calls. It is currently unclear how the EFI runtime services ABI will be clarified with respect to SVE, so it safest to assume that the predicate registers and FFR must be saved and restored too. No attempt is made to restore the restore the vector length after a call, for now. It is deemed rather insane for EFI to change it, and contemporary EFI implementations certainly won't. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/uapi')
0 files changed, 0 insertions, 0 deletions