qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] virtio-rng and fd passing


From: Peter Krempa
Subject: Re: [Qemu-devel] virtio-rng and fd passing
Date: Fri, 01 Mar 2013 23:59:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

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

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