[Top][All Lists]
[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: |
Thu, 1 Apr 2010 14:03:36 +0000 |
User-agent: |
KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; ) |
>> > 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.
> 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?
> > > + qemu_gettimeofday(&now);
> >
> > Using qemu_gettimeofday is almost certainly wrong, and you want to
> > be using virtual time. Plus I'm not convinced this is the right
> > place to enforce rate limiting.
>
> If it's for rate limiting how fast the guest can take entropy from the
> host, to ensure the host's entropy cannot be exhausted by a single
> greedy guest, then perhaps qemu_gettimeofday() is right here. I doubt
> if virtual time is right, at least not by itself.
gettimeofday can and does jump arbitrarily. Comparing returned values is
almost always wrong.
Paul
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Paul Brook, 2010/04/01
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Jamie Lokier, 2010/04/01
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG,
Paul Brook <=
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Ian Molton, 2010/04/02
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Paul Brook, 2010/04/03
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Ian Molton, 2010/04/13
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Paul Brook, 2010/04/13
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Paul Brook, 2010/04/13
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Ian Molton, 2010/04/20
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Jamie Lokier, 2010/04/20
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Ian Molton, 2010/04/20
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Blue Swirl, 2010/04/20
- Re: [Qemu-devel] [PATCH 2/2] VirtIO RNG, Jamie Lokier, 2010/04/20