From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRlcD-0006Ri-Es for qemu-devel@nongnu.org; Fri, 26 Oct 2012 11:14:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRlc5-0007lu-Dy for qemu-devel@nongnu.org; Fri, 26 Oct 2012 11:14:29 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:38528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRlc5-0007li-95 for qemu-devel@nongnu.org; Fri, 26 Oct 2012 11:14:21 -0400 Received: by mail-oa0-f45.google.com with SMTP id i18so2616265oag.4 for ; Fri, 26 Oct 2012 08:14:19 -0700 (PDT) From: Anthony Liguori In-Reply-To: <508A9A9E.3090203@redhat.com> References: <508A9A9E.3090203@redhat.com> Date: Fri, 26 Oct 2012 10:14:16 -0500 Message-ID: <871ugljmev.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 0/8] virtio-rng: hardware random number generator device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Amit Shah Cc: qemu list Paolo Bonzini writes: > Il 26/10/2012 13:01, Amit Shah ha scritto: >> Amit Shah (1): >> virtio-rng: hardware random number generator device >> >> Anthony Liguori (7): >> object: add object_property_add_bool (v2) >> qdev: add realized property and make adding child bus implied by >> realize >> vl: add -object option to create QOM objects from the command line >> vl: add -late-object to create QOM objects after machine init >> rng: add RndBackend abstract object class >> rng-urandom: add an RNG backend that uses /dev/urandom >> rng-egd: introduce EGD compliant RNG backend > > Honestly I think this is overengineered. > > I would instead have the following: > > - a chardev that can read from a file (e.g. -chardev > file,path=/dev/urandom,read=on,id=urandom) Then your multiplexing lots of logic into the chardev layer. Three of these patches can be dropped. See the series I sent out. Regards, Anthony Liguori > - a device that accepts a chardev and understands both egd and raw > (e.g. > -device virtio-rng-pci,chardev=urandom,egd=off or -device > virtio-rng-pci,chardev=egdsock,egd=on). > > - optionally, a chardev that can produce an endless stream of data via > rdrand. > > And that's it. > > Also, even if RngBackend goes in, there is no need for -late-object > right now, so I would not include it in this series. > > Paolo