[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/23] docs: Add documentation for vhost based RNG implementation
From: |
Michael S. Tsirkin |
Subject: |
[PULL 10/23] docs: Add documentation for vhost based RNG implementation |
Date: |
Tue, 13 Jul 2021 18:10:36 -0400 |
From: Mathieu Poirier <mathieu.poirier@linaro.org>
Add description and example for the vhost-user based RNG implementation.
Tailored on Viresh Kumar's vhost-user-i2c documentation.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Message-Id: <20210710005929.1702431-5-mathieu.poirier@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
docs/tools/index.rst | 1 +
docs/tools/vhost-user-rng.rst | 74 +++++++++++++++++++++++++++++++++++
2 files changed, 75 insertions(+)
create mode 100644 docs/tools/vhost-user-rng.rst
diff --git a/docs/tools/index.rst b/docs/tools/index.rst
index d923834a73..9d80fa89ec 100644
--- a/docs/tools/index.rst
+++ b/docs/tools/index.rst
@@ -15,5 +15,6 @@ Contents:
qemu-nbd
qemu-pr-helper
qemu-trace-stap
+ vhost-user-rng
virtfs-proxy-helper
virtiofsd
diff --git a/docs/tools/vhost-user-rng.rst b/docs/tools/vhost-user-rng.rst
new file mode 100644
index 0000000000..7f69d7bb3c
--- /dev/null
+++ b/docs/tools/vhost-user-rng.rst
@@ -0,0 +1,74 @@
+QEMU vhost-user-rng - RNG emulation backend
+===========================================
+
+Synopsis
+--------
+
+**vhost-user-rng** [*OPTIONS*]
+
+Description
+-----------
+
+This program is a vhost-user backend that emulates a VirtIO random number
+generator (RNG). It uses the host's random number generator pool,
+/dev/urandom by default but configurable at will, to satisfy requests from
+guests.
+
+This program is designed to work with QEMU's ``-device
+vhost-user-rng-pci`` but should work with any virtual machine monitor
+(VMM) that supports vhost-user. See the Examples section below.
+
+Options
+-------
+
+.. program:: vhost-user-rng
+
+.. option:: -h, --help
+
+ Print help.
+
+.. option:: -v, --verbose
+
+ Increase verbosity of output
+
+.. option:: -s, --socket-path=PATH
+
+ Listen on vhost-user UNIX domain socket at PATH. Incompatible with --fd.
+
+.. option:: -f, --fd=FDNUM
+
+ Accept connections from vhost-user UNIX domain socket file descriptor FDNUM.
+ The file descriptor must already be listening for connections.
+ Incompatible with --socket-path.
+
+.. option:: -p, --period
+
+ Rate, in milliseconds, at which the RNG hardware can generate random data.
+ Used in conjunction with the --max-bytes option.
+
+.. option:: -m, --max-bytes
+
+ In conjuction with the --period parameter, provides the maximum number of
byte
+ per milliseconds a RNG device can generate.
+
+Examples
+--------
+
+The daemon should be started first:
+
+::
+
+ host# vhost-user-rng --socket-path=rng.sock --period=1000 --max-bytes=4096
+
+The QEMU invocation needs to create a chardev socket the device can
+use to communicate as well as share the guests memory over a memfd.
+
+::
+
+ host# qemu-system
\
+ -chardev socket,path=$(PATH)/rng.sock,id=rng0
\
+ -device vhost-user-rng-pci,chardev=rng0
\
+ -m 4096
\
+ -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on
\
+ -numa node,memdev=mem
\
+ ...
--
MST
- [PULL 17/23] hw/i386: Add a default_bus_bypass_iommu pc machine option, (continued)
- [PULL 17/23] hw/i386: Add a default_bus_bypass_iommu pc machine option, Michael S. Tsirkin, 2021/07/13
- [PULL 18/23] hw/pci: Add pci_bus_range() to get PCI bus number range, Michael S. Tsirkin, 2021/07/13
- [PULL 19/23] hw/arm/virt-acpi-build: Add IORT support to bypass SMMUv3, Michael S. Tsirkin, 2021/07/13
- [PULL 20/23] hw/i386/acpi-build: Add DMAR support to bypass iommu, Michael S. Tsirkin, 2021/07/13
- [PULL 21/23] hw/i386/acpi-build: Add IVRS support to bypass iommu, Michael S. Tsirkin, 2021/07/13
- [PULL 22/23] docs: Add documentation for iommu bypass, Michael S. Tsirkin, 2021/07/13
- [PULL 23/23] vhost-vsock: SOCK_SEQPACKET feature bit support, Michael S. Tsirkin, 2021/07/13
- [PULL 06/23] bios-tables-test: Update golden binaries, Michael S. Tsirkin, 2021/07/13
- [PULL 04/23] bios-tables-test: Allow changes in DSDT ACPI tables, Michael S. Tsirkin, 2021/07/13
- [PULL 16/23] hw/arm/virt: Add default_bus_bypass_iommu machine option, Michael S. Tsirkin, 2021/07/13
- [PULL 10/23] docs: Add documentation for vhost based RNG implementation,
Michael S. Tsirkin <=
- Re: [PULL 00/23] pc,pci,virtio: lots of new features, Peter Maydell, 2021/07/14
- Re: [PULL 00/23] pc,pci,virtio: lots of new features, Marcel Apfelbaum, 2021/07/15
- Re: [PULL 00/23] pc,pci,virtio: lots of new features, Michael S. Tsirkin, 2021/07/15
- Re: [PULL 00/23] pc,pci,virtio: lots of new features, Peter Maydell, 2021/07/16
- Re: [PULL 00/23] pc,pci,virtio: lots of new features, Michael S. Tsirkin, 2021/07/16
- Re: [PULL 00/23] pc,pci,virtio: lots of new features, Peter Maydell, 2021/07/16
- Re: [PULL 00/23] pc,pci,virtio: lots of new features, Michael S. Tsirkin, 2021/07/16
- Re: [PULL 00/23] pc,pci,virtio: lots of new features, Michael S. Tsirkin, 2021/07/16