From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH 4/5] KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation. Date: Wed, 17 Dec 2014 22:23:59 +0100 Message-ID: <5491F46F.4000603@suse.de> References: <1417573842-32101-1-git-send-email-paulus@samba.org> <1417573842-32101-5-git-send-email-paulus@samba.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, Michael Ellerman To: Paul Mackerras Return-path: In-Reply-To: <1417573842-32101-5-git-send-email-paulus@samba.org> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 03.12.14 03:30, Paul Mackerras wrote: > From: Michael Ellerman > > Some PowerNV systems include a hardware random-number generator. > This HWRNG is present on POWER7+ and POWER8 chips and is capable of > generating one 64-bit random number every microsecond. The random > numbers are produced by sampling a set of 64 unstable high-frequency > oscillators and are almost completely entropic. > > PAPR defines an H_RANDOM hypercall which guests can use to obtain one > 64-bit random sample from the HWRNG. This adds a real-mode > implementation of the H_RANDOM hypercall. This hypercall was > implemented in real mode because the latency of reading the HWRNG is > generally small compared to the latency of a guest exit and entry for > all the threads in the same virtual core. > > Userspace can detect the presence of the HWRNG and the H_RANDOM > implementation by quering the KVM_CAP_PPC_HWRNG capability. The > H_RANDOM hypercall implementation will only be invoked when the guest > does an H_RANDOM hypercall if userspace first enables the in-kernel > H_RANDOM implementation using the KVM_CAP_PPC_ENABLE_HCALL capability. > > Signed-off-by: Michael Ellerman > Signed-off-by: Paul Mackerras This conflicts with the per-cpu cleanups. I've pulled the patch from my queue. Please rebase it once we've got everything merged together and resubmit. Alex