qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Paul Brook <paul@codesourcery.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Andreas Faerber <afaerber@suse.de>
Subject: Re: [Qemu-devel] [RFC PATCH 0/4] virtio-rng and RngBackend infrastructure (v2)
Date: Wed, 4 Jul 2012 17:16:32 +0530	[thread overview]
Message-ID: <20120704114632.GB11292@amit.redhat.com> (raw)
In-Reply-To: <201207012306.36639.paul@codesourcery.com>

On (Sun) 01 Jul 2012 [23:06:36], Paul Brook wrote:
> > 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.

Linux has a virtio-rng driver for quite a while; some other hypervisor
implementation may have the corresponding device, I'm not aware of
it.  This series just adds a corresponding device to qemu.

You're right that it's just a chardev interface, and virtio-serial
would've been ideal for this, but given Linux has a driver already,
it's best to add the device to qemu.

> 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.

Well I do agree with this qemu doesn't really need to bother about the
various ways of getting random numbers, just accept them over a
chardev and fwd them to the guest.

		Amit

  reply	other threads:[~2012-07-04 11:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1340664362-25603-1-git-send-email-aliguori@us.ibm.com>
2012-07-01 22:06 ` [Qemu-devel] [RFC PATCH 0/4] virtio-rng and RngBackend infrastructure (v2) Paul Brook
2012-07-04 11:46   ` Amit Shah [this message]
     [not found] ` <1340664362-25603-5-git-send-email-aliguori@us.ibm.com>
     [not found]   ` <4FE8ED50.3090803@us.ibm.com>
     [not found]     ` <20120626104851.GF11372@amit.redhat.com>
     [not found]       ` <4FE9B2A0.2030002@us.ibm.com>
2012-07-06 12:06         ` [Qemu-devel] [PATCH 4/4] virtio-rng: hardware random number generator device Amit Shah
2012-07-11  9:32           ` Dor Laor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120704114632.GB11292@amit.redhat.com \
    --to=amit.shah@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=paul@codesourcery.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).