[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86/hvm: Make DRNG feature visible in CPUID



# HG changeset patch
# User Yang, Wei <wei.y.yang@xxxxxxxxx>
# Date 1308051888 -3600
# Node ID 864a3dd1d9b4664f1ece44c9eaf390969253b7a8
# Parent  782bc7b2661a3921af21130f34f599f68911f2ce
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@xxxxxxxxx>
---


diff -r 782bc7b2661a -r 864a3dd1d9b4 tools/libxc/xc_cpufeature.h
--- a/tools/libxc/xc_cpufeature.h       Fri Jun 10 13:51:39 2011 +0100
+++ b/tools/libxc/xc_cpufeature.h       Tue Jun 14 12:44:48 2011 +0100
@@ -87,6 +87,7 @@
 #define X86_FEATURE_XSAVE       26 /* XSAVE/XRSTOR/XSETBV/XGETBV */
 #define X86_FEATURE_AVX         28 /* Advanced Vector Extensions */
 #define X86_FEATURE_F16C        29 /* Half-precision convert instruction */
+#define X86_FEATURE_RDRAND      30 /* Digital Random Number Generator */
 #define X86_FEATURE_HYPERVISOR  31 /* Running under some hypervisor */
 
 /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001 */
diff -r 782bc7b2661a -r 864a3dd1d9b4 tools/libxc/xc_cpuid_x86.c
--- a/tools/libxc/xc_cpuid_x86.c        Fri Jun 10 13:51:39 2011 +0100
+++ b/tools/libxc/xc_cpuid_x86.c        Tue Jun 14 12:44:48 2011 +0100
@@ -314,6 +314,7 @@
                     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));
diff -r 782bc7b2661a -r 864a3dd1d9b4 xen/include/asm-x86/cpufeature.h
--- a/xen/include/asm-x86/cpufeature.h  Fri Jun 10 13:51:39 2011 +0100
+++ b/xen/include/asm-x86/cpufeature.h  Tue Jun 14 12:44:48 2011 +0100
@@ -106,6 +106,7 @@
 #define X86_FEATURE_OSXSAVE    (4*32+27) /* OSXSAVE */
 #define X86_FEATURE_AVX        (4*32+28) /* Advanced Vector Extensions */
 #define X86_FEATURE_F16C       (4*32+29) /* Half-precision convert instruction 
*/
+#define X86_FEATURE_RDRAND     (4*32+30) /* Digital Random Number Generator */
 #define X86_FEATURE_HYPERVISOR (4*32+31) /* Running under some hypervisor */
 
 /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.