]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: Enable DRNG feature support for KVM
authorYang, Wei Y <wei.y.yang@intel.com>
Mon, 13 Jun 2011 13:52:33 +0000 (21:52 +0800)
committerAvi Kivity <avi@redhat.com>
Tue, 12 Jul 2011 10:16:21 +0000 (13:16 +0300)
This patch exposes DRNG feature to KVM 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>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c

index 84f46074ca7485485a33cd8062bd29d57d7abf6d..6f1e54d0828dbeee37cc56af42e9f531a2f2ae0a 100644 (file)
@@ -2345,7 +2345,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
                0 /* Reserved, DCA */ | F(XMM4_1) |
                F(XMM4_2) | F(X2APIC) | F(MOVBE) | F(POPCNT) |
                0 /* Reserved*/ | F(AES) | F(XSAVE) | 0 /* OSXSAVE */ | F(AVX) |
-               F(F16C);
+               F(F16C) | F(RDRAND);
        /* cpuid 0x80000001.ecx */
        const u32 kvm_supported_word6_x86_features =
                F(LAHF_LM) | F(CMP_LEGACY) | 0 /*SVM*/ | 0 /* ExtApicSpace */ |