]> git.baikalelectronics.ru Git - kernel.git/commit
um: Save FPU registers between task switches
authorIngo van Lil <inguin@gmx.de>
Wed, 14 Sep 2011 23:21:23 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Sep 2011 01:09:37 +0000 (18:09 -0700)
commit603818b93316d54bd85573e3ae1ba9b10d9d4553
treeda25f3f4ece74b9fa328ce3884f19ff18eff516d
parent4e70dc52277c06e19d3e5a24c51c25924d3f4ba9
um: Save FPU registers between task switches

Some time ago Jeff prepared 9e5dbb1fcaad ("uml: stop saving process FP
state") for UML to stop saving the process FP state between task
switches.  The assumption was that since with SKAS0 every guest process
runs inside a host process context the host OS will take care of keeping
the proper FP state.

Unfortunately this is not true for multi-threaded applications, where
all guest threads share a single host process context yet all may use
the FPU on their own.  Although I haven't verified it I suspect things
to be even worse in SKAS3 mode where all guest processes run inside a
single host process.

The patch reintroduces the saving and restoring of the FP context
between task switches.

[richard@nod.at: Ingo posted this patch in 2009, sadly it was never applied
and got lost. Now in 2011 the problem was reported by Gunnar.]

Signed-off-by: Ingo van Lil <inguin@gmx.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Reported-by: <gunnarlindroth@hotmail.com>
Tested-by: <gunnarlindroth@hotmail.com>
Cc: Stanislav Meduna <stano@meduna.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/include/shared/registers.h
arch/um/kernel/process.c
arch/um/os-Linux/registers.c
arch/um/os-Linux/skas/mem.c
arch/um/os-Linux/skas/process.c
arch/um/sys-i386/shared/sysdep/ptrace.h
arch/um/sys-x86_64/shared/sysdep/ptrace.h