qemu-e2k/target-ppc
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
..
arch_dump.c
cpu-models.c
cpu-models.h
cpu-qom.h
cpu.h tlb: Add "ifetch" argument to cpu_mmu_index() 2015-09-11 08:15:28 -07:00
dfp_helper.c
excp_helper.c target-ppc: Fix SRR0 when taking unaligned exceptions 2015-09-20 22:48:39 +02:00
fpu_helper.c
gdbstub.c
helper_regs.h
helper.h
int_helper.c target-ppc: fix vcipher, vcipherlast, vncipherlast and vpermxor 2015-09-20 22:48:39 +02:00
kvm_ppc.h ppc/spapr: Implement H_RANDOM hypercall in QEMU 2015-09-23 10:51:11 +10:00
kvm-stub.c
kvm.c ppc/spapr: Implement H_RANDOM hypercall in QEMU 2015-09-23 10:51:11 +10:00
machine.c migration: Use normal VMStateDescriptions for Subsections 2015-06-12 06:53:57 +02:00
Makefile.objs kvm_ppc: remove kvmppc_timer_hack 2015-09-20 22:48:38 +02:00
mem_helper.c
mfrom_table_gen.c
mfrom_table.c
misc_helper.c
mmu_helper.c
mmu-hash32.c
mmu-hash32.h
mmu-hash64.c
mmu-hash64.h
monitor.c monitor: remove target-specific code from monitor.c 2015-09-16 17:33:32 +02:00
STATUS
timebase_helper.c
translate_init.c Target-ppc: Remove unnecessary variable 2015-09-11 10:21:38 +03:00
translate.c target-ppc: fix xscmpodp and xscmpudp decoding 2015-09-20 22:48:39 +02:00
user_only_helper.c