From: Wei Liu <wei.liu2@citrix.com>
To: Luwei Kang <luwei.kang@intel.com>
Cc: wei.liu2@citrix.com, Andrew Cooper <andrew.cooper3@citrix.com>,
ian.jackson@eu.citrix.com, Jan Beulich <JBeulich@suse.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] tools/libxc: Add xstate cpuid leaf of avx512
Date: Fri, 4 Nov 2016 10:57:51 +0000 [thread overview]
Message-ID: <20161104105751.GC30231@citrix.com> (raw)
In-Reply-To: <1478248158-29112-1-git-send-email-luwei.kang@intel.com>
CC x86 maintainers. I will defer this patch to them.
On Fri, Nov 04, 2016 at 04:29:18PM +0800, Luwei Kang wrote:
> Enable get xstate cpuid leaf information regarding avx512 in guest.
>
> Signed-off-by: Luwei Kang <luwei.kang@intel.com>
> ---
> tools/libxc/xc_cpuid_x86.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
> index de06b32..d761805 100644
> --- a/tools/libxc/xc_cpuid_x86.c
> +++ b/tools/libxc/xc_cpuid_x86.c
> @@ -406,6 +406,9 @@ static void intel_xc_cpuid_policy(xc_interface *xch,
> #define X86_XCR0_AVX (1ULL << 2)
> #define X86_XCR0_BNDREG (1ULL << 3)
> #define X86_XCR0_BNDCSR (1ULL << 4)
> +#define X86_XCR0_OPMASK (1ULL << 5)
> +#define X86_XCR0_ZMM (1ULL << 6)
> +#define X86_XCR0_HI_ZMM (1ULL << 7)
> #define X86_XCR0_PKRU (1ULL << 9)
> #define X86_XCR0_LWP (1ULL << 62)
>
> @@ -437,6 +440,9 @@ static void xc_cpuid_config_xsave(xc_interface *xch,
> if ( test_bit(X86_FEATURE_MPX, info->featureset) )
> guest_xfeature_mask |= X86_XCR0_BNDREG | X86_XCR0_BNDCSR;
>
> + if ( test_bit(X86_FEATURE_AVX512F, info->featureset) )
> + guest_xfeature_mask |= X86_XCR0_OPMASK | X86_XCR0_ZMM | X86_XCR0_HI_ZMM;
> +
> if ( test_bit(X86_FEATURE_PKU, info->featureset) )
> guest_xfeature_mask |= X86_XCR0_PKRU;
>
> --
> 2.7.4
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-11-04 10:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 8:29 [PATCH] tools/libxc: Add xstate cpuid leaf of avx512 Luwei Kang
2016-11-04 10:20 ` Andrew Cooper
2016-11-04 11:00 ` Wei Liu
2016-11-04 13:40 ` Konrad Rzeszutek Wilk
2016-11-04 14:24 ` Wei Liu
2016-11-04 10:57 ` Wei Liu [this message]
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=20161104105751.GC30231@citrix.com \
--to=wei.liu2@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=luwei.kang@intel.com \
--cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).