From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zdqef-00018q-GS for qemu-devel@nongnu.org; Sun, 20 Sep 2015 22:16:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zdqec-0007Pf-A7 for qemu-devel@nongnu.org; Sun, 20 Sep 2015 22:16:33 -0400 Date: Mon, 21 Sep 2015 11:59:20 +1000 From: David Gibson Message-ID: <20150921015920.GH20331@voom.fritz.box> References: <1442479781-20164-1-git-send-email-thuth@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bygAmIonOAIqBxQB" Content-Disposition: inline In-Reply-To: <1442479781-20164-1-git-send-email-thuth@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: agraf@suse.de, kvm-ppc@vger.kernel.org, qemu-devel@nongnu.org, michael@ellerman.id.au, qemu-ppc@nongnu.org, amit.shah@redhat.com, sam.bobroff@au1.ibm.com, gkurz@linux.vnet.ibm.com --bygAmIonOAIqBxQB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 17, 2015 at 10:49:41AM +0200, Thomas Huth wrote: > The PAPR interface defines a hypercall to pass high-quality > hardware generated random numbers to guests. Recent kernels can > already provide this hypercall to the guest if the right hardware > random number generator is available. But in case the user wants > to use another source like EGD, or QEMU is running with an older > kernel, we should also have this call in QEMU, so that guests that > do not support virtio-rng yet can get good random numbers, too. >=20 > This patch now adds a new pseudo-device to QEMU that either > directly provides this hypercall to the guest or is able to > enable the in-kernel hypercall if available. The in-kernel > hypercall can be enabled with the use-kvm property, e.g.: >=20 > qemu-system-ppc64 -device spapr-rng,use-kvm=3Dtrue >=20 > For handling the hypercall in QEMU instead, a "RngBackend" is > required since the hypercall should provide "good" random data > instead of pseudo-random (like from a "simple" library function > like rand() or g_random_int()). Since there are multiple RngBackends > available, the user must select an appropriate back-end via the > "rng" property of the device, e.g.: >=20 > qemu-system-ppc64 -object rng-random,filename=3D/dev/hwrng,id=3Dgid0 \ > -device spapr-rng,rng=3Dgid0 ... >=20 > See http://wiki.qemu-project.org/Features-Done/VirtIORNG for > other example of specifying RngBackends. >=20 > Signed-off-by: Thomas Huth Thanks, applied to spapr-next. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --bygAmIonOAIqBxQB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJV/2R4AAoJEGw4ysog2bOStf4QANftVYSmy/t/S9wePM8vOpfV otsOsotYdIW4yrHfoWuhJOYk00FJY5shyVm36UqgvK4pZNWToaKgoKN62GHg39re 0IXi7ZGmVe/y4jNNVMfTGLe+yNR9bRKbrqsQLkTUI5LSH7n+tcqdwjlgSp3y4/qM us5Ok3+NK3nh+edVUB/raBbXY1J7ERDgvcoeQkZSPT96dN6NAf1D375L6Gh10hZw GzKyd7fyni93+IqzA9L6Sb5wjF4QiC2xDQkfPwXA63EWoKkSWsjmsa6MSkbaHZyv bDA3o/PDWhj61R++0rYnh83RgplD+VdGpxzcTpwiaLzz8jhixfMniMO2SW5aRPVp kK5oDSP++YkfoKYwREskttWIg87K/FhdBT4aAainRNQXS28gXfwqse1UQFQqwtZK hkf7HJ93H0ZZuzifKdM22YUyDgVnc0kzQKD4sKl7PUBTB2tCnS5wRky+g8ahoPCA 3jkMdmFBN430sgG87dvzXJOug8XF41Us5rjrD369aOQ8WBYa/HQ+JdIfR3KeWur4 SuerffeMoTImKygFce3csecUay0QVCsgFgXSzdw+XvR4QQn3p66xSQsEYmXkwIp0 gN84C5KGDIQBlS5A1DSWfO6WtMu8z//dzC7D8oD4Rs1+Ks6vOmsRT5RJPrXV/VMc 11i7QAjkyzVO6Mvo9HXO =94Iu -----END PGP SIGNATURE----- --bygAmIonOAIqBxQB--