From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBXBr-0002e1-8s for qemu-devel@nongnu.org; Fri, 01 Mar 2013 16:08:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UBXBq-00019i-Ar for qemu-devel@nongnu.org; Fri, 01 Mar 2013 16:08:27 -0500 Received: from mail-oa0-f53.google.com ([209.85.219.53]:49125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBXBq-00019Z-5n for qemu-devel@nongnu.org; Fri, 01 Mar 2013 16:08:26 -0500 Received: by mail-oa0-f53.google.com with SMTP id m1so6427137oag.26 for ; Fri, 01 Mar 2013 13:08:25 -0800 (PST) From: Anthony Liguori In-Reply-To: <513110D3.5030503@linux.vnet.ibm.com> References: <512FF819.7050505@redhat.com> <87k3pqzy2y.fsf@codemonkey.ws> <513110D3.5030503@linux.vnet.ibm.com> Date: Fri, 01 Mar 2013 15:08:21 -0600 Message-ID: <87d2vig75m.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] virtio-rng and fd passing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: "qemu-devel@nongnu.org" Stefan Berger writes: > On 03/01/2013 03:04 PM, Anthony Liguori wrote: >> Eric Blake 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