[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] spapr: Add support for hwrng when available

From: Michael Ellerman
Subject: Re: [Qemu-devel] [PATCH] spapr: Add support for hwrng when available
Date: Fri, 27 Sep 2013 18:36:37 +1000

On Thu, 2013-09-26 at 13:06 +0200, Alexander Graf wrote:
> On 26.09.2013, at 08:37, Michael Ellerman wrote:
> > Some powerpc systems have support for a hardware random number generator
> > (hwrng). If such a hwrng is present the host kernel can provide access
> > to it via the H_RANDOM hcall.
> > 
> > The kernel advertises the presence of a hwrng with the KVM_CAP_PPC_HWRNG
> > capability. If this is detected we add the appropriate device tree bits
> > to advertise the presence of the hwrng to the guest kernel.
> > 
> > Signed-off-by: Michael Ellerman <address@hidden>
> Please implement this 100% without KVM first, then if we end up running into 
> performance bottlenecks we can always add KVM acceleration.

So have the host kernel read from the hwrng, export it to userspace via
a char device, which is then read by qemu, which then copies it back
into the host kernel, which can then give it to the guest.

Or from the guest perspective, instead of a cheap switch to host real
mode and back - a full switch to kernel virtual, then to user, back to
kernel, back to user, back to kernel, back to guest.

Frankly I can't see why that is a superior option?

> Also, please make sure to CC address@hidden on PPC patches :).

Sorry, didn't realise there was one, will add it in future.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]