WSL2-Linux-Kernel/arch/x86/kernel/fpu
Huaitong Han a05917b6ba x86/fpu: Fix get_xsave_addr() behavior under virtualization
KVM uses the get_xsave_addr() function in a different fashion from
the native kernel, in that the 'xsave' parameter belongs to guest vcpu,
not the currently running task.

But 'xsave' is replaced with current task's (host) xsave structure, so
get_xsave_addr() will incorrectly return the bad xsave address to KVM.

Fix it so that the passed in 'xsave' address is used - as intended
originally.

Signed-off-by: Huaitong Han <huaitong.han@intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: <stable@vger.kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dave.hansen@intel.com
Link: http://lkml.kernel.org/r/1446800423-21622-1-git-send-email-huaitong.han@intel.com
[ Tidied up the changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-11-12 09:34:58 +01:00
..
Makefile x86/fpu: Factor out the FPU regset code into fpu/regset.c 2015-05-19 15:48:09 +02:00
bugs.c x86/fpu/init: Propagate __init annotations 2015-05-19 15:48:11 +02:00
core.c x86/fpu/math-emu: Fix crash in fork() 2015-08-22 10:23:03 +02:00
init.c x86/fpu: Rename XSAVE macros 2015-09-14 12:21:46 +02:00
regset.c x86/fpu: Rename XSAVE macros 2015-09-14 12:21:46 +02:00
signal.c x86/fpu: Fix 32-bit signal frame handling 2015-11-12 09:23:45 +01:00
xstate.c x86/fpu: Fix get_xsave_addr() behavior under virtualization 2015-11-12 09:34:58 +01:00