Skip to content

virtio-rng: hardware random number generator device

Amit Shah qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8object: add object_property_add_bool (v2)include/qemu/object.h qom/object.c+72 -00 replies
2/8qdev: add realized property and make adding child bus implied by realizehw/qdev.c+35 -10 replies
3/8vl: add -object option to create QOM objects from the command lineqemu-config.c qemu-options.hx vl.c+72 -00 replies
4/8vl: add -late-object to create QOM objects after machine initqemu-config.c qemu-options.hx vl.c+33 -30 replies
5/8rng: add RndBackend abstract object classMakefile.objs backends/Makefile.objs backends/rng.c +1 more+189 -00 replies
6/8rng-urandom: add an RNG backend that uses /dev/urandombackends/Makefile.objs backends/rng-urandom.c+145 -10 replies
7/8rng-egd: introduce EGD compliant RNG backendbackends/Makefile.objs backends/rng-egd.c+216 -10 replies
8/8virtio-rng: hardware random number generator devicehw/Makefile.objs hw/pci.h hw/s390-virtio-bus.c +6 more+279 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/8] virtio-rng: hardware random number generator device

Hello,

Reviving this series last sent by Anthony to the list. The differences are minimal from the time Anthony sent, just rebasing to the current tree and fixing a couple of minor bugs.

I've not really looked in detail at the object patches -- mostly just concerned about the device itself.

Please review and apply if appropriate.

Changes from last submission:
- Fix a few typos/whitespaces in rng.h
- Switch to virtqueue_get_avail_bytes(): helps remove the savevm/loadvm complexities and provides a cleaner interface
- Remove the older qevent hunks that got left behind
- Rebase to master
- Bugfix: rng_backend_request_entropy() in chr_read() should pass len, not size
- Do not request for more entropy in chr_read() once the current request is served; there are other ways this notification will go out.

Amit Shah (1):
virtio-rng: hardware random number generator device

Anthony Liguori (7):
object: add object_property_add_bool (v2)
qdev: add realized property and make adding child bus implied by
realize
vl: add -object option to create QOM objects from the command line
vl: add -late-object to create QOM objects after machine init
rng: add RndBackend abstract object class
rng-urandom: add an RNG backend that uses /dev/urandom
rng-egd: introduce EGD compliant RNG backend

 Makefile.objs          |    2 +
 backends/Makefile.objs |    1 +
 backends/rng-egd.c     |  215 ++++++++++++++++++++++++++++++++++++++++++++++++
 backends/rng-urandom.c |  144 ++++++++++++++++++++++++++++++++
 backends/rng.c         |   93 +++++++++++++++++++++
 hw/Makefile.objs       |    1 +
 hw/pci.h               |    1 +
 hw/qdev.c              |   36 ++++++++-
 hw/s390-virtio-bus.c   |   37 ++++++++
 hw/s390-virtio-bus.h   |    2 +
 hw/virtio-pci.c        |   60 +++++++++++++
 hw/virtio-pci.h        |    2 +
 hw/virtio-rng.c        |  149 +++++++++++++++++++++++++++++++++
 hw/virtio-rng.h        |   24 ++++++
 hw/virtio.h            |    3 +
 include/qemu/object.h  |   16 ++++
 include/qemu/rng.h     |   93 +++++++++++++++++++++
 qemu-config.c          |   20 +++++
 qemu-options.hx        |   20 +++++
 qom/object.c           |   56 +++++++++++++
 vl.c                   |   62 ++++++++++++++
 21 files changed, 1036 insertions(+), 1 deletions(-)
 create mode 100644 backends/Makefile.objs
 create mode 100644 backends/rng-egd.c
 create mode 100644 backends/rng-urandom.c
 create mode 100644 backends/rng.c
 create mode 100644 hw/virtio-rng.c
 create mode 100644 hw/virtio-rng.h
 create mode 100644 include/qemu/rng.h
Signature · 1 line
1.7.7.6