qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: Paul Mackerras <paulus@samba.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] spapr: Add support for hwrng when available
Date: Fri, 27 Sep 2013 18:36:37 +1000	[thread overview]
Message-ID: <1380270997.20440.6.camel@concordia> (raw)
In-Reply-To: <EA607236-E282-4D8B-B2C1-4A46175D1297@suse.de>

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 <michael@ellerman.id.au>
> 
> 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 qemu-ppc@nongnu.org on PPC patches :).

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

cheers

  reply	other threads:[~2013-09-27  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26  6:37 [Qemu-devel] [PATCH] spapr: Add support for hwrng when available Michael Ellerman
2013-09-26 11:06 ` Alexander Graf
2013-09-27  8:36   ` Michael Ellerman [this message]
2013-09-27  8:58     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380270997.20440.6.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=agraf@suse.de \
    --cc=paulus@samba.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).