qemu

FORK: QEMU emulator
git clone https://git.neptards.moe/neptards/qemu.git
Log | Files | Refs | Submodules | LICENSE

vhost-user-rng.rst (1065B)


      1 QEMU vhost-user-rng - RNG emulation
      2 ===================================
      3 
      4 Background
      5 ----------
      6 
      7 What follows builds on the material presented in vhost-user.rst - it should
      8 be reviewed before moving forward with the content in this file.
      9 
     10 Description
     11 -----------
     12 
     13 The vhost-user-rng device implementation was designed to work with a random
     14 number generator daemon such as the one found in the vhost-device crate of
     15 the rust-vmm project available on github [1].
     16 
     17 [1]. https://github.com/rust-vmm/vhost-device
     18 
     19 Examples
     20 --------
     21 
     22 The daemon should be started first:
     23 
     24 ::
     25 
     26   host# vhost-device-rng --socket-path=rng.sock -c 1 -m 512 -p 1000
     27 
     28 The QEMU invocation needs to create a chardev socket the device can
     29 use to communicate as well as share the guests memory over a memfd.
     30 
     31 ::
     32 
     33   host# qemu-system								\
     34       -chardev socket,path=$(PATH)/rng.sock,id=rng0				\
     35       -device vhost-user-rng-pci,chardev=rng0					\
     36       -m 4096 									\
     37       -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on	\
     38       -numa node,memdev=mem							\
     39       ...