From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH 0/4] random,x86,kvm: Add and use MSR_KVM_GET_RNG_SEED Date: Wed, 16 Jul 2014 09:03:02 -0700 Message-ID: <53C6A236.7040904@zytor.com> References: <20140716064110.GV18167@minantech.com> <53C62563.6050106@redhat.com> <53C62B68.50702@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Daniel Borkmann , Gleb Natapov , kvm list , "Theodore Ts'o" , "linux-kernel@vger.kernel.org" , Kees Cook , X86 ML , Srivatsa Vaddagiri , Raghavendra K T To: Andy Lutomirski , Paolo Bonzini Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 07/16/2014 07:07 AM, Andy Lutomirski wrote: > > This patch has nothing whatsoever to do with how much I trust the CPU > vs the hypervisor. It's for the enormous installed base of machines > without RDRAND. > > hpa suggested emulating RDRAND awhile ago, but I think that'll > unusably slow -- the kernel uses RDRAND in various places where it's > expected to be fast, and not using it at all will be preferable to > causing a VM exit for every few bytes. I've been careful to only use > this in the guest in places where a few hundred to a few thousand > cycles per 64 bits of RNG seed is acceptable. > I suggested emulating RDRAND *but not set the CPUID bit*. We already developed a protocol in KVM/Qemu to enumerate emulated features (created for MOVBE as I recall), specifically to service the semantic "feature X will work but will be substantially slower than normal." -hpa