From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlSI4-0007hV-ET for qemu-devel@nongnu.org; Sun, 01 Jul 2012 18:06:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlSI2-0007Fx-9V for qemu-devel@nongnu.org; Sun, 01 Jul 2012 18:06:47 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:39610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlSI2-0007Fk-33 for qemu-devel@nongnu.org; Sun, 01 Jul 2012 18:06:46 -0400 From: Paul Brook Date: Sun, 1 Jul 2012 23:06:36 +0100 References: <1340664362-25603-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1340664362-25603-1-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Message-ID: <201207012306.36639.paul@codesourcery.com> Subject: Re: [Qemu-devel] [RFC PATCH 0/4] virtio-rng and RngBackend infrastructure (v2) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Anthony Liguori , Stefan Hajnoczi , Markus Armbruster , Amit Shah , Paolo Bonzini , Andreas Faerber > This series depends on my QOM -object series that I just posted. > > In Amit's thread on virtio-rng, danpb mentioned that we really ought to > have a proper RNG backend infrastructure and of course he's correct on > that. > > Now that we have QOM, I wanted to demonstrate how we can use QOM to > construct a complete backend without adding any new infrastructure. > > I've now implemented a urandom and egd backend and tested them. I think > the first three patches are ready to go. I never really understood why this exists in the first place. It's a simple readonly charcter device. IMHO you should be using virtio-serial. This is virtio-console v.s. virtio-serial all over again. The only thing close to a reason I've heard is that guest OS is incompetent and can't source random rata from a serial device. Even accepting the pointless guest device, I see absolutely no reason to have special infrastructure for this within qemu. Character devices do everything you need. Creating annother "read stream of data" API is needless duplication and only going to reintroduce bugs we already fixed in the character device layer. Paul