From: Amit Shah <amit.shah@redhat.com>
To: qemu list <qemu-devel@nongnu.org>
Cc: Amit Shah <amit.shah@redhat.com>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: [Qemu-devel] [PATCH v2 0/1] virtio-rng: hardware random number generator
Date: Sat, 26 May 2012 01:02:48 +0530 [thread overview]
Message-ID: <cover.1337972540.git.amit.shah@redhat.com> (raw)
Hello,
Here's the 2nd iteration of the virtio hwrng device.
This device just accepts data from the chardev and sends it up to the
guest. There's no policy here on restricting the number of bytes we
send to the guest, as that can be done by management apps.
libvirt has a better picture of the host's entropy and multiple
guests, so it can better make decisions on when to supply entropy, and
how much. Of course, Linux has a low watermark, via
/proc/sys/kernel/random/entropy_avail
and it will stop giving out entropy once that watermark is reached
(currently 64).
/dev/urandom doesn't use all the bits at once, so using that device to
feed in entropy to the guest is safer and faster (without compromising
on the quality of randomness).
libvirt can also use daemons like egd to feed in entropy.
v2:
* Remove hard-wiring to /dev/urandom
* Use chardev for input
* Add a QMP event for notifying listeners about entropy needed and
the bytes asked for by the guest.
* Add s390 code
Please review, and apply if appropriate.
Amit Shah (1):
virtio-rng: hardware random number generator device
Makefile.objs | 1 +
hw/pci.h | 1 +
hw/s390-virtio-bus.c | 35 +++++++++
hw/s390-virtio-bus.h | 2 +
hw/virtio-pci.c | 51 +++++++++++++
hw/virtio-pci.h | 2 +
hw/virtio-rng.c | 199 ++++++++++++++++++++++++++++++++++++++++++++++++++
hw/virtio-rng.h | 24 ++++++
hw/virtio.h | 3 +
monitor.c | 3 +
monitor.h | 1 +
11 files changed, 322 insertions(+), 0 deletions(-)
create mode 100644 hw/virtio-rng.c
create mode 100644 hw/virtio-rng.h
--
1.7.7.6
next reply other threads:[~2012-05-25 19:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 19:32 Amit Shah [this message]
2012-05-25 19:32 ` [Qemu-devel] [PATCH v2 1/1] virtio-rng: hardware random number generator device Amit Shah
2012-05-25 20:00 ` Anthony Liguori
2012-05-25 20:20 ` Amit Shah
2012-06-04 11:04 ` Anthony Liguori
2012-06-05 9:41 ` Amit Shah
2012-06-05 9:54 ` Anthony Liguori
2012-06-05 10:16 ` Amit Shah
2012-06-11 13:34 ` Daniel P. Berrange
2012-05-28 8:33 ` Daniel P. Berrange
2012-05-28 9:17 ` Amit Shah
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=cover.1337972540.git.amit.shah@redhat.com \
--to=amit.shah@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/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).