aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_cpuid_x86.c
diff options
context:
space:
mode:
authorYang, Wei <wei.y.yang@intel.com>2011-06-14 12:44:48 +0100
committerYang, Wei <wei.y.yang@intel.com>2011-06-14 12:44:48 +0100
commit30090ad8567c97578099fb2aaec29a6a7c9f90a6 (patch)
tree560b46395c1991719674d77519df7141bc7ef3cb /tools/libxc/xc_cpuid_x86.c
parent70c3da08fb4a7d158ebed65fb57ed741668b6a20 (diff)
downloadxen-30090ad8567c97578099fb2aaec29a6a7c9f90a6.tar.gz
xen-30090ad8567c97578099fb2aaec29a6a7c9f90a6.tar.bz2
xen-30090ad8567c97578099fb2aaec29a6a7c9f90a6.zip
x86/hvm: Make DRNG feature visible in CPUID
This patch exposes DRNG feature to HVM guests. The RDRAND instruction can provide software with sequences of random numbers generated from white noise. Signed-off-by: Yang, Wei <wei.y.yang@intel.com>
Diffstat (limited to 'tools/libxc/xc_cpuid_x86.c')
-rw-r--r--tools/libxc/xc_cpuid_x86.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index aae6882653..287b1e7789 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -314,6 +314,7 @@ static void xc_cpuid_hvm_policy(
bitmaskof(X86_FEATURE_POPCNT) |
bitmaskof(X86_FEATURE_AES) |
bitmaskof(X86_FEATURE_F16C) |
+ bitmaskof(X86_FEATURE_RDRAND) |
((xfeature_mask != 0) ?
(bitmaskof(X86_FEATURE_AVX) |
bitmaskof(X86_FEATURE_XSAVE)) : 0));