Skip to content

Commit

Permalink
qemu: Add VirtIORNG random data source
Browse files Browse the repository at this point in the history
Adds /dev/urandom from the host as a source for random data so the guest
does not block on calls to getentropy() etc.

Signed-off-by: Albert Schwarzkopf <githubc@quitesimple.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
  • Loading branch information
crtxcr authored and jforissier committed Jan 9, 2020
1 parent 9a4dd00 commit d6b1781
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common.mk
Expand Up @@ -320,6 +320,9 @@ edk2-clean-common:
# QEMU / QEMUv8
################################################################################
QEMU_CONFIGURE_PARAMS_COMMON = --cc="$(CCACHE)gcc" --extra-cflags="-Wno-error"
QEMU_EXTRA_ARGS +=\
-object rng-random,filename=/dev/urandom,id=rng0 \
-device virtio-rng-pci,rng=rng0,max-bytes=1024,period=1000

ifeq ($(QEMU_VIRTFS_ENABLE),y)
QEMU_CONFIGURE_PARAMS_COMMON += --enable-virtfs
Expand Down

0 comments on commit d6b1781

Please sign in to comment.