qemu/include
Thomas Huth 4d9392be6c ppc/spapr: Implement H_RANDOM hypercall in QEMU
The PAPR interface defines a hypercall to pass high-quality
hardware generated random numbers to guests. Recent kernels can
already provide this hypercall to the guest if the right hardware
random number generator is available. But in case the user wants
to use another source like EGD, or QEMU is running with an older
kernel, we should also have this call in QEMU, so that guests that
do not support virtio-rng yet can get good random numbers, too.

This patch now adds a new pseudo-device to QEMU that either
directly provides this hypercall to the guest or is able to
enable the in-kernel hypercall if available. The in-kernel
hypercall can be enabled with the use-kvm property, e.g.:

 qemu-system-ppc64 -device spapr-rng,use-kvm=true

For handling the hypercall in QEMU instead, a "RngBackend" is
required since the hypercall should provide "good" random data
instead of pseudo-random (like from a "simple" library function
like rand() or g_random_int()). Since there are multiple RngBackends
available, the user must select an appropriate back-end via the
"rng" property of the device, e.g.:

 qemu-system-ppc64 -object rng-random,filename=/dev/hwrng,id=gid0 \
                   -device spapr-rng,rng=gid0 ...

See http://wiki.qemu-project.org/Features-Done/VirtIORNG for
other example of specifying RngBackends.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-09-23 10:51:11 +10:00
..
block block: Allow specifying driver-specific options to reopen 2015-09-14 16:51:36 +02:00
crypto crypto: introduce new module for handling TLS sessions 2015-09-15 15:07:43 +01:00
disas disas: Add print_insn to disassemble info 2015-07-09 15:20:40 +02:00
exec include/exec: Move cputlb exec.c defs out 2015-09-16 17:33:33 +02:00
fpu
hw ppc/spapr: Implement H_RANDOM hypercall in QEMU 2015-09-23 10:51:11 +10:00
libdecnumber
migration migration: Fix global state with Xen. 2015-08-03 16:13:23 +00:00
monitor qom: Don't use 'gen': false for qom-get, qom-set, object-add 2015-09-21 09:56:49 +02:00
net qmp: Wean off qerror_report() 2015-06-22 18:20:40 +02:00
qapi qapi: Introduce a first class 'any' type 2015-09-21 09:56:49 +02:00
qemu machine: Eliminate QEMUMachine and qemu_register_machine() 2015-09-19 16:40:30 +02:00
qom cpu: Add crash_occurred flag into CPUState 2015-09-16 17:33:32 +02:00
standard-headers target-i386: move asm-x86/hyperv.h to standard-headers 2015-09-16 17:33:32 +02:00
sysemu machine: Eliminate QEMUMachine and qemu_register_machine() 2015-09-19 16:40:30 +02:00
ui Include monitor/monitor.h exactly where needed 2015-06-22 18:20:41 +02:00
config.h
elf.h linux-user: Support tilegx architecture in linux-user 2015-09-15 07:41:19 -07:00
glib-compat.h
qemu-common.h * Support for jemalloc 2015-09-14 16:13:16 +01:00
qemu-io.h
qjson.h
trace-tcg.h
trace.h