Re: [PATCH] arm64/fpsimd: Don't flush SME register hardware state along with thread

From: Catalin Marinas
Date: Wed Jul 26 2023 - 14:45:19 EST


On Mon, 24 Jul 2023 14:09:19 +0100, Mark Brown wrote:
> We recently changed the fpsimd thread flush to flush the physical SME
> state as well as the thread state for the current thread. Unfortunately
> this leads to intermittent corruption in interaction with the lazy
> FPSIMD register switching. When under heavy load such as can be
> triggered by the startup phase of fp-stress it is possible that the
> current thread may not be scheduled prior to returning to userspace, and
> indeed we may end up returning to the last thread that was scheduled on
> the PE without ever exiting the kernel to any other task. If that
> happens then we will not reload the register state from memory, leading
> to loss of any SME register state.
>
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64/fpsimd: Don't flush SME register hardware state along with thread
https://git.kernel.org/arm64/c/3421ddbe6d64

--
Catalin