qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG
Date: Sat, 3 Apr 2010 16:06:26 +0100
User-agent: KMail/1.12.4 (Linux/2.6.33-2-amd64; KDE/4.3.4; x86_64; ; )

> Paul Brook wrote:
> >>>>        This patch adds support for virtio-rng. Data is read from a
> >>>> chardev and can be either raw entropy or received via the EGD
> >>>> protocol.
> >>>
> >>> I still don't get why you need this at all. It seems like
> >>> virtio-serial would already provides everything you need.
> >>
> >> I guess when virtio-rng was first written, virtio-serial wasn't
> >> flexible enough because it didn't support multiple devices
> >
> > That argument no longer holds.
> 
> So now everything that looks like a stream of bytes has to use the
> virtio-serial code...

IMO, yes. That's the whole point of virtio-serial.

You can handle it however you like in your in your favourite guest OS, but I 
object to qemu having multiple virtio devices that look and smell exactly like 
a serial port.

>Why? Its not like it'll make the rng device any simpler, smaller,
>faster, or reduce its dependencies. Virtio is simple enough to begin with!

I disagree. Past experience shows that it's more than possible to completely 
screw up something as simple as a serial port. If everything that looks like a 
serial port provides their own implementation then the chances are they'll all 
be missing something, and broken in different ways.

Take rate limiting as an example: Your implementation has at least one 
outright bug (using gettimeofday), and various questionable characteristics 
(is a 1-second token bucket appropriate).

The EGD protocol bits are another example. You aren't exposing any of the 
interesting bits of this protocol to the guest, so it seems entirely 
reasonable to connect this to a serial port. That allows it to be used by 
guests that don't have a virtio-rng driver.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]