Stefan Berger <stef...@linux.vnet.ibm.com> writes: > On 03/01/2013 03:04 PM, 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? > > I followed the example on the libvirt website trying out the XML for the > rng device while adpating the libvirt code to use fd passing and > generating the -add-fd command line parameters. > >> >> You can pass chardevs to the egd backend. It's really not a good idea >> to pass a fd via rng-rangom. > > Fine, then we won't use fd passing for this device, whatever the reason > may be.
So let's step back. There are two backends currently supported: rng-random and rng-egd. I don't see any point in taking an fd for rng-random. I don't think labeling comes into play here. But if libvirt wants to interact with virtio-rng in a more intelligent way (implementing a policy to distribute entropy), then rng-egd is the right way to do that. Regards, Anthony Liguori > > Stefan