rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

Add a new RNG backend using QEMU builtin getrandom function.

It can be created and used with something like:

    ... -object rng-builtin,id=rng0 -device virtio-rng,rng=rng0 ...

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20190820160615.14616-2-lvivier@redhat.com>
This commit is contained in:
Laurent Vivier 2019-08-20 18:06:13 +02:00 committed by Michael S. Tsirkin
parent 379d83f2c9
commit 6c4e9d487f
3 changed files with 86 additions and 1 deletions

View file

@ -4332,6 +4332,13 @@ other options.
The @option{share} boolean option is @var{on} by default with memfd.
@item -object rng-builtin,id=@var{id}
Creates a random number generator backend which obtains entropy from
QEMU builtin functions. The @option{id} parameter is a unique ID that
will be used to reference this entropy backend from the @option{virtio-rng}
device.
@item -object rng-random,id=@var{id},filename=@var{/dev/random}
Creates a random number generator backend which obtains entropy from