On 03/01/13 21:04, Anthony Liguori wrote:
Eric Blake <ebl...@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.

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.

Peter

Reply via email to