All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Peter Krempa <pkrempa@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] virtio-rng and fd passing
Date: Fri, 01 Mar 2013 17:14:01 -0600	[thread overview]
Message-ID: <8738we4ssm.fsf@codemonkey.ws> (raw)
In-Reply-To: <513132DA.7030504@redhat.com>

Peter Krempa <pkrempa@redhat.com> writes:

> On 03/01/13 21:04, Anthony Liguori wrote:
>> Eric Blake <eblake@redhat.com> writes:
>>
>>> Stefan Berger and I discovered on IRC that virtio-rng is unable to
>>> support fd passing.  We attempted:
>>>
>>> qemu-system-x86_64 ... -add-fd set=4,fd=34,opaque=RDONLY:/dev/urandom
>>> -object rng-random,id=rng0,filename=/dev/fdset/4 -device
>>> virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x6
>>
>> Why are you using th rng-random backend instead of the rng-egd backend?
>
> There are two issues with using the egd backend for unprepared devices:
>
> 1) The backend spits out "\x20\x40" commands(egd blocking entropy 
> request for 0x40 bytes) so it really has to be used with some kind of 
> EGD server implementation otherwise it might feed your /dev/random with 
> predictable bytes if used directly.

Yes.  That's the point.

>
> 2) performance of the egd backend is terrible as I've reported here
> https://bugzilla.redhat.com/show_bug.cgi?id=915381 (yes I'm aware that I 
> probably should have filed a upstream bug too, but I was hoping Amit 
> would do it in the process)
>
> On my machine I managed to do 0.2KiB/s with the egd backend both with 
> using constant data as a high performance source, but also with a true 
> random number generator (in the Raspberry pi SoC, sources 107KiB/s of 
> entropy). The rng-random backend performs a bit better averaging
> 1.2MiB/s.

That's a bug that I wasn't aware of until you wrote this.  I'll look
into it next week.

Regards,

Anthony Liguori

>
> Peter

      reply	other threads:[~2013-03-01 23:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <512FF819.7050505@redhat.com>
2013-03-01  9:51 ` [Qemu-devel] virtio-rng and fd passing Paolo Bonzini
2013-03-04  4:29   ` Amit Shah
2013-03-06  6:20   ` Amit Shah
2013-03-01 19:37 ` H. Peter Anvin
2013-03-01 20:13   ` Stefan Berger
2013-03-01 20:15     ` H. Peter Anvin
2013-03-01 20:41     ` Paolo Bonzini
2013-03-01 20:04 ` Anthony Liguori
2013-03-01 20:34   ` Stefan Berger
2013-03-01 21:08     ` Anthony Liguori
2013-03-01 21:13       ` Eric Blake
2013-03-01 23:05         ` Anthony Liguori
2013-03-01 23:14           ` Eric Blake
2013-03-01 23:59             ` Anthony Liguori
2013-03-02  0:29               ` Eric Blake
2013-03-02  3:13                 ` Anthony Liguori
2013-03-02 12:23                   ` Paolo Bonzini
2013-03-03 21:05                     ` Anthony Liguori
2013-03-04 21:57                       ` Eric Blake
2013-03-04 22:24                         ` Anthony Liguori
2013-03-04 22:35                           ` Eric Blake
2013-03-05  4:44                     ` H. Peter Anvin
2013-03-04 21:54                   ` Eric Blake
2013-03-02  0:34               ` Stefan Berger
2013-03-02  3:17                 ` Anthony Liguori
2013-03-02  3:34                   ` Stefan Berger
2013-03-03 21:06                     ` Anthony Liguori
2013-03-04 15:27                     ` Corey Bryant
2013-03-04 10:29             ` Daniel P. Berrange
2013-03-04 15:55               ` Corey Bryant
2013-03-01 22:59   ` Peter Krempa
2013-03-01 23:14     ` Anthony Liguori [this message]

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=8738we4ssm.fsf@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.