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 - and maybe virtio-rng is still needed to enforce the EGD protocol when that is being used. > > + 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. I would hope that the host can rate limit itself without needing apps to govern themselves, though. -- Jamie