From: Huaitong Han <huaitong.han@intel.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com
Cc: dave.hansen@intel.com, x86@kernel.org,
linux-kernel@vger.kernel.org,
Huaitong Han <huaitong.han@intel.com>
Subject: [PATCH] x86/fpu: Fix get_xsave_addr which returns error pointer to KVM
Date: Fri, 6 Nov 2015 17:00:23 +0800 [thread overview]
Message-ID: <1446800423-21622-1-git-send-email-huaitong.han@intel.com> (raw)
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 = ¤t->thread.fpu.state.xsave;
/*
* We should not ever be requesting features that we
* have not enabled. Remember that pcntxt_mask is
--
2.4.3
next reply other threads:[~2015-11-06 9:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 9:00 Huaitong Han [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446800423-21622-1-git-send-email-huaitong.han@intel.com \
--to=huaitong.han@intel.com \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®