OpenCloudOS-Kernel/arch/um/os-Linux
Ingo van Lil fbfe9c847e um: Save FPU registers between task switches
Some time ago Jeff prepared 42daba3165 ("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>
2011-09-14 18:09:37 -07:00
..
drivers um: Kill directly reference of netdev->priv 2008-12-04 15:07:33 -08:00
skas um: Save FPU registers between task switches 2011-09-14 18:09:37 -07:00
sys-i386 uml: remove include of asm/user.h 2008-06-12 18:05:40 -07:00
sys-x86_64 uml: deal with inaccessible address space start 2008-06-06 11:29:10 -07:00
Makefile um: disable scan_elf_aux() on x86_64 2011-07-25 20:57:13 -07:00
aio.c uml: style fixes in arch/um/os-Linux 2008-02-08 09:22:42 -08:00
elf_aux.c um: disable scan_elf_aux() on x86_64 2011-07-25 20:57:13 -07:00
execvp.c [PATCH] uml: make execvp safe for our usage 2006-11-25 13:28:34 -08:00
file.c Deal with missing exports for hostfs 2010-08-09 16:47:25 -04:00
helper.c uml: helper.c warning corrections 2011-07-25 20:57:13 -07:00
irq.c uml: remove init_irq_signals 2008-02-05 09:44:30 -08:00
main.c um: disable scan_elf_aux() on x86_64 2011-07-25 20:57:13 -07:00
mem.c uml: free resources 2011-07-25 20:57:13 -07:00
process.c um: fix crash while os_dump_core() 2011-05-25 08:39:42 -07:00
registers.c um: Save FPU registers between task switches 2011-09-14 18:09:37 -07:00
sigio.c UML: make several more things static 2008-07-24 10:47:24 -07:00
signal.c UML: make several more things static 2008-07-24 10:47:24 -07:00
start_up.c uml: improve error messages 2009-04-01 08:59:16 -07:00
time.c um: fix global timer issue when using CONFIG_NO_HZ 2010-10-26 16:52:03 -07:00
tls.c uml: style fixes pass 1 2007-10-16 09:43:05 -07:00
tty.c uml: tidy kern_util.h 2008-02-05 09:44:26 -08:00
uaccess.c uml: style fixes in arch/um/os-Linux 2008-02-08 09:22:42 -08:00
umid.c UML: make several more things static 2008-07-24 10:47:24 -07:00
user_syms.c um: fix _FORTIFY_SOURCE=2 support for kernel modules 2011-07-25 20:57:12 -07:00
util.c um: add earlyprintk support 2011-05-25 08:39:41 -07:00