On (Tue) 15 Sep 2015 [14:26:06], David Gibson wrote: > On Mon, Sep 14, 2015 at 08:32:36AM +0200, Thomas Huth wrote: > > On 14/09/15 04:15, David Gibson wrote: > > > On Fri, Sep 11, 2015 at 11:17:01AM +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. > > >> > > >> This patch now adds a new pseude-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.: > > >> > > >> qemu-system-ppc64 -device spapr-rng,use-kvm=true > > >> > > >> 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 backend via the "backend" > > >> property of the device, e.g.: > > >> > > >> qemu-system-ppc64 -object rng-random,filename=/dev/hwrng,id=rng0 \ > > >> -device spapr-rng,backend=rng0 ... (snip) > > > More importantly, this should probably be called "rng" not "backend" > > > to match virtio-rng. > > > > Since the device is already called "spapr-rng", i.e. has "rng" in its > > name, I'd rather like to keep this as "backend" to make it clear that > > you specify the backend this way. > > Hm, personally I'd weigh consistency with virtio-rng higher than the > slightly confusing name. Agreed. Amit -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html