diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-10-30 17:45:05 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-11-16 08:36:13 -0600 |
commit | 904d6f588063fb5ad2b61998acdf1e73fb465067 (patch) | |
tree | 12d966d8fff1c6d36965a615c0afd75af22111ab /hw/virtio-rng.h | |
parent | 16c915ba42b45df7a64a6908287f03bfa3764bed (diff) | |
download | qemu-904d6f588063fb5ad2b61998acdf1e73fb465067.zip qemu-904d6f588063fb5ad2b61998acdf1e73fb465067.tar.gz qemu-904d6f588063fb5ad2b61998acdf1e73fb465067.tar.bz2 |
virtio-rng: add rate limiting support
This adds parameters to virtio-rng-pci to allow rate limiting the entropy a
guest receives. An example command line:
$ qemu -device virtio-rng-pci,max-bytes=1024,period=1000
Would limit entropy collection to 1Kb/s.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-rng.h')
-rw-r--r-- | hw/virtio-rng.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/virtio-rng.h b/hw/virtio-rng.h index fbb0104..7324d0a 100644 --- a/hw/virtio-rng.h +++ b/hw/virtio-rng.h @@ -19,6 +19,8 @@ struct VirtIORNGConf { RngBackend *rng; + uint64_t max_bytes; + uint32_t period_ms; }; #endif |