diff options
| author | Ingo van Lil <inguin@gmx.de> | 2011-09-14 19:21:23 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-14 21:09:37 -0400 |
| commit | fbfe9c847edf57ac8232aeafb290f272289893a3 (patch) | |
| tree | da25f3f4ece74b9fa328ce3884f19ff18eff516d /arch/um/sys-i386 | |
| parent | b40997b872cdb70140f127af6069f00a86b6cf81 (diff) | |
um: Save FPU registers between task switches
Some time ago Jeff prepared 42daba316557 ("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>
Diffstat (limited to 'arch/um/sys-i386')
| -rw-r--r-- | arch/um/sys-i386/shared/sysdep/ptrace.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/um/sys-i386/shared/sysdep/ptrace.h b/arch/um/sys-i386/shared/sysdep/ptrace.h index d50e62e07070..c398a5076111 100644 --- a/arch/um/sys-i386/shared/sysdep/ptrace.h +++ b/arch/um/sys-i386/shared/sysdep/ptrace.h | |||
| @@ -53,6 +53,7 @@ extern int sysemu_supported; | |||
| 53 | 53 | ||
| 54 | struct uml_pt_regs { | 54 | struct uml_pt_regs { |
| 55 | unsigned long gp[MAX_REG_NR]; | 55 | unsigned long gp[MAX_REG_NR]; |
| 56 | unsigned long fp[HOST_FPX_SIZE]; | ||
| 56 | struct faultinfo faultinfo; | 57 | struct faultinfo faultinfo; |
| 57 | long syscall; | 58 | long syscall; |
| 58 | int is_user; | 59 | int is_user; |
