From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxdtK-0002kh-Rj for qemu-devel@nongnu.org; Fri, 02 Apr 2010 06:14:18 -0400 Received: from [140.186.70.92] (port=43681 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxdtJ-0002jw-5J for qemu-devel@nongnu.org; Fri, 02 Apr 2010 06:14:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxdtH-0003IW-TO for qemu-devel@nongnu.org; Fri, 02 Apr 2010 06:14:17 -0400 Received: from bhuna.collabora.co.uk ([93.93.128.226]:50071) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxdtH-0003IS-PH for qemu-devel@nongnu.org; Fri, 02 Apr 2010 06:14:15 -0400 Message-ID: <4BB5C332.7080207@collabora.co.uk> Date: Fri, 02 Apr 2010 11:13:06 +0100 From: Ian Molton MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG References: <4BB2053C.6000701@collabora.co.uk> <201004011317.45269.paul@codesourcery.com> <20100401123036.GA1752@shareable.org> <201004011503.36690.paul@codesourcery.com> In-Reply-To: <201004011503.36690.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, Gerd Hoffmann 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... 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! >> and maybe virtio-rng is still needed to enforce the EGD protocol when that >> is being used. > > Maybe, though the benefit of having this knowledge in wemu seems somewhat > unclear. If we do want it then shouldn't be be implemented as a char device > backend, rather than part of a specific serial port implementation? Be my guest... > gettimeofday can and does jump arbitrarily. Comparing returned values is > almost always wrong. True, however the worst case is still a very temporary over-alotment of entropy, which really isn't a problem. -Ian