On Wed, Jan 20, 2021 at 09:09:49PM -0800, Andy Lutomirski wrote:
The default kernel_fpu_begin() doesn't work on systems that support XMM but haven't yet enabled CR4.OSFXSR. This causes crashes when _mmx_memcpy() is called too early because LDMXCSR generates #UD when the aforementioned bit is clear.
Fix it by using kernel_fpu_begin_mask(KFPU_387) explicitly.
Fixes: 7ad816762f9b ("x86/fpu: Reset MXCSR to default in kernel_fpu_begin()") Cc: stable@vger.kernel.org Reported-by: Krzysztof Mazur krzysiek@podlesie.net Signed-off-by: Andy Lutomirski luto@kernel.org
arch/x86/lib/mmx_32.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-)
Thanks, 5.10 + this patch series boots on K7 with SSE.
Tested-by: Krzysztof Mazur krzysiek@podlesie.net
Regards, Krzysiek