mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/fpu: Fix get_xsave_addr which returns error pointer to KVM
@ 2015-11-06  9:00 Huaitong Han
  2015-11-10 22:40 ` Dave Hansen
  2015-11-12 13:28 ` [tip:x86/urgent] x86/fpu: Fix get_xsave_addr() behavior under virtualization tip-bot for Huaitong Han
  0 siblings, 2 replies; 3+ messages in thread
From: Huaitong Han @ 2015-11-06  9:00 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: dave.hansen, x86, linux-kernel, Huaitong Han

when KVM uses the get_xsave_addr, xsave parameter belongs to guest vcpu, if
xsave is replaced with current task (host) xsave, get_xsave_addr will return error
xsave addr to KVM.

Signed-off-by: Huaitong Han <huaitong.han@intel.com>
---
 arch/x86/kernel/fpu/xstate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
index 62fc001..2c4ac07 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -402,7 +402,6 @@ void *get_xsave_addr(struct xregs_state *xsave, int xstate_feature)
 	if (!boot_cpu_has(X86_FEATURE_XSAVE))
 		return NULL;
 
-	xsave = &current->thread.fpu.state.xsave;
 	/*
 	 * We should not ever be requesting features that we
 	 * have not enabled.  Remember that pcntxt_mask is
-- 
2.4.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-12 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-06  9:00 [PATCH] x86/fpu: Fix get_xsave_addr which returns error pointer to KVM Huaitong Han
2015-11-10 22:40 ` Dave Hansen
2015-11-12 13:28 ` [tip:x86/urgent] x86/fpu: Fix get_xsave_addr() behavior under virtualization tip-bot for Huaitong Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome