From: "Han, Huaitong" <huaitong.han@intel.com>
To: "Kang, Luwei" <luwei.kang@intel.com>
Cc: "andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
"wei.liu2@citrix.com" <wei.liu2@citrix.com>,
"Wang, Yong Y" <yong.y.wang@intel.com>,
"jbeulich@suse.com" <jbeulich@suse.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86/cpuid: fix dom0 crash on skylake machine
Date: Wed, 1 Jun 2016 05:54:09 +0000 [thread overview]
Message-ID: <1464760448.3985.3.camel@intel.com> (raw)
In-Reply-To: <1464757092-13177-1-git-send-email-luwei.kang@intel.com>
On Wed, 2016-06-01 at 12:58 +0800, Luwei Kang wrote:
> CPUID.0XD.0X0.EAX is from machine value for dom0, and dom0 kernel will xsetbv
> with xfeatures_mask that is from CPUID.0XD.0X0.EAX, but handle_xsetbv has
> ingored XSTATE_PKRU with hardware protection fault emulation, so dom0 kernel
> will crash on skylake machine with PKRU support.
>
> Signed-off-by: Luwei Kang <luwei.kang@intel.com>
Signed-off-by: Huaitong Han <huaitong.han@intel.com>
> ---
> xen/arch/x86/traps.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
> index 1ef8401..5e72e44 100644
> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -1100,6 +1100,9 @@ void pv_cpuid(struct cpu_user_regs *regs)
> */
> if ( !is_control_domain(currd) && !is_hardware_domain(currd) )
> cpuid_count(leaf, subleaf, &tmp, &b, &tmp, &tmp);
> +
> + /* PV is not supported by XSTATE_PKRU. */
> + a &= ~XSTATE_PKRU;
> break;
> }
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-06-01 5:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 4:58 [PATCH] x86/cpuid: fix dom0 crash on skylake machine Luwei Kang
2016-06-01 5:54 ` Han, Huaitong [this message]
2016-06-01 8:49 ` Jan Beulich
2016-06-01 9:00 ` Han, Huaitong
2016-06-01 9:03 ` Andrew Cooper
2016-06-01 9:17 ` Jan Beulich
2016-06-01 9:34 ` Andrew Cooper
2016-06-01 9:43 ` Jan Beulich
2016-06-01 11:27 ` Andrew Cooper
2016-06-01 11:38 ` Jan Beulich
2016-06-01 11:45 ` Andrew Cooper
2016-06-01 12:01 ` Jan Beulich
2016-06-01 13:03 ` Andrew Cooper
2016-06-01 13:28 ` Jan Beulich
2016-06-02 11:12 ` Andrew Cooper
2016-06-02 11:34 ` Jan Beulich
2016-06-02 11:44 ` Andrew Cooper
2016-06-02 12:15 ` Jan Beulich
2016-06-01 9:21 ` Han, Huaitong
2016-06-01 9:30 ` Wei Liu
2016-06-01 9:45 ` Andrew Cooper
2016-06-01 10:54 ` Kang, Luwei
2016-06-01 10:57 ` Andrew Cooper
2016-06-01 9:04 ` Jan Beulich
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=1464760448.3985.3.camel@intel.com \
--to=huaitong.han@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=luwei.kang@intel.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=yong.y.wang@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.