From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRp2V-0000ks-KM for qemu-devel@nongnu.org; Fri, 26 Oct 2012 14:53:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRp2U-0006SW-JQ for qemu-devel@nongnu.org; Fri, 26 Oct 2012 14:53:51 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:61594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRp2U-0006Rj-Df for qemu-devel@nongnu.org; Fri, 26 Oct 2012 14:53:50 -0400 Received: by mail-ee0-f45.google.com with SMTP id b47so1304103eek.4 for ; Fri, 26 Oct 2012 11:53:48 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <508ADC2D.8070207@redhat.com> Date: Fri, 26 Oct 2012 20:53:33 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <604401631.2277495.1351264128301.JavaMail.root@redhat.com> <871ugl44v5.fsf@codemonkey.ws> In-Reply-To: <871ugl44v5.fsf@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Amit Shah , "H. Peter Anvin" , qemu-devel@nongnu.org, Andreas Faerber Il 26/10/2012 17:42, Anthony Liguori ha scritto: >> Maybe rdrand, but that's just a chardev---so why isn't this enough: >> >> -chardev file,source=on,path=/dev/hwrng,id=chr0 -device virtio-rng-pci,file=chr0 >> -chardev rdrand,id=chr0 -device virtio-rng-pci,file=chr0 >> -chardev socket,host=localhost,port=1024,id=chr0 -device virtio-rng-pci,rng=chr0,egd=on >> >> (which I suggested in my reply to Amit)? > > I don't like overloading chardev to representate any !block device > backend which is what I fear we're doing here. Like -chardev msmouse you mean? ;) > EGD is more than just a dumb pipe of data too. It's got a way to query > available entropy. I have a strong suspicion that over time, we'll add > methods to virtio-rng to query available entropy. That would mean > adding a backend specific ioctl to the chardev layer which is pretty > ugly. > > The overhead of creating a separate backend to begin with is extremely > small. We're talking about dozens of lines of code. So I don't see > what the problem is. If you just make rng-random take a chardev, I have no problem with the series. Paolo