xen/23510-hvm-cpuid-DRNG.patch
Charles Arnold 1b78387def - fate#309893: Add Xen support for AMD family 15h processors
- fate#309901: Add Xen support for SVM TSC scaling in AMD family 
  15h
- fate#311951: Ivy Bridge: XEN support for Supervisor Mode 
  Execution Protection (SMEP) 
  23437-amd-fam15-TSC-scaling.patch
  23462-libxc-cpu-feature.patch
  23481-x86-SMEP.patch
  23504-x86-SMEP-hvm.patch
  23505-x86-cpu-add-arg-check.patch
  23508-vmx-proc-based-ctls-probe.patch
  23510-hvm-cpuid-DRNG.patch
  23511-amd-fam15-no-flush-for-C3.patch
  23516-cpuid-ERMS.patch
  23538-hvm-pio-emul-no-host-crash.patch
  23539-hvm-cpuid-FSGSBASE.patch
  23543-x86_64-maddr_to_virt-assertion.patch
  23546-fucomip.patch

- Fix libxc reentrancy issues
  23383-libxc-rm-static-vars.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=128
2011-06-17 16:45:46 +00:00

45 lines
1.9 KiB
Diff

# HG changeset patch
# User Yang, Wei <wei.y.yang@intel.com>
# 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@intel.com>
--- a/tools/libxc/xc_cpufeature.h
+++ b/tools/libxc/xc_cpufeature.h
@@ -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 */
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -262,6 +262,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));
--- a/xen/include/asm-x86/cpufeature.h
+++ b/xen/include/asm-x86/cpufeature.h
@@ -105,6 +105,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 */