aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-11-03 08:16:47 +0000
committerKeir Fraser <keir@xen.org>2010-11-03 08:16:47 +0000
commit5a4cecd8281530b9165b0186877d5a9db2dcef00 (patch)
tree3604c0781fedff4e453d8c26e25c4a824db0bb46 /tools/libxc
parent2d741abb30af1a2abc45f1cba4c8e78e6d1b07d0 (diff)
downloadxen-5a4cecd8281530b9165b0186877d5a9db2dcef00.tar.gz
xen-5a4cecd8281530b9165b0186877d5a9db2dcef00.tar.bz2
xen-5a4cecd8281530b9165b0186877d5a9db2dcef00.zip
x86 hvm: exposes AVX to guest.
Signed-off-by: Shan Haitao <haitao.shan@intel.com> Signed-off-by: Han Weidong <weidong.han@intel.com>
Diffstat (limited to 'tools/libxc')
-rw-r--r--tools/libxc/xc_cpufeature.h1
-rw-r--r--tools/libxc/xc_cpuid_x86.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/libxc/xc_cpufeature.h b/tools/libxc/xc_cpufeature.h
index 3d16d6da8d..96991a6813 100644
--- a/tools/libxc/xc_cpufeature.h
+++ b/tools/libxc/xc_cpufeature.h
@@ -101,6 +101,7 @@
#define X86_FEATURE_POPCNT (4*32+23) /* POPCNT instruction */
#define X86_FEATURE_AES (4*32+25) /* AES acceleration instructions */
#define X86_FEATURE_XSAVE (4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */
+#define X86_FEATURE_AVX (4*32+28) /* Advanced Vector Extensions */
#define X86_FEATURE_HYPERVISOR (4*32+31) /* Running under some hypervisor */
/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index 68e99a1738..de68f263c6 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -195,7 +195,8 @@ static void xc_cpuid_hvm_policy(
bitmaskof(X86_FEATURE_SSE4_1) |
bitmaskof(X86_FEATURE_SSE4_2) |
bitmaskof(X86_FEATURE_POPCNT) |
- bitmaskof(X86_FEATURE_AES));
+ bitmaskof(X86_FEATURE_AES) |
+ bitmaskof(X86_FEATURE_AVX));
regs[2] |= bitmaskof(X86_FEATURE_HYPERVISOR);