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

@ -1,4 +1,4 @@
common-obj-y += rng.o rng-egd.o
common-obj-y += rng.o rng-egd.o rng-builtin.o
common-obj-$(CONFIG_POSIX) += rng-random.o
common-obj-$(CONFIG_TPM) += tpm.o