No description
Find a file
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
audio
backends qemu-char: Use g_new() & friends where that makes obvious sense 2015-09-16 17:33:33 +02:00
block
bsd-user
crypto
default-configs spapr: Initialize hotplug memory address space 2015-09-23 10:51:10 +10:00
disas
docs spapr: Support ibm,dynamic-reconfiguration-memory 2015-09-23 10:51:10 +10:00
dtc@65cc4d2748
fpu
fsdev
gdb-xml
hw ppc/spapr: Implement H_RANDOM hypercall in QEMU 2015-09-23 10:51:11 +10:00
include ppc/spapr: Implement H_RANDOM hypercall in QEMU 2015-09-23 10:51:11 +10:00
libcacard
libdecnumber
linux-headers target-i386: move asm-x86/hyperv.h to standard-headers 2015-09-16 17:33:32 +02:00
linux-user target-ppc: Fix SRR0 when taking unaligned exceptions 2015-09-20 22:48:39 +02:00
migration
net
pc-bios pseries: Update SLOF firmware image to qemu-slof-20150813 2015-09-23 10:51:09 +10:00
pixman@87eea99e44
po
qapi qapi-introspect: Hide type names 2015-09-21 09:56:49 +02:00
qga
qobject
qom qom: Fix invalid error check in property_get_str() 2015-09-19 08:10:12 +02:00
roms pseries: Update SLOF firmware image to qemu-slof-20150813 2015-09-23 10:51:09 +10:00
scripts qapi-introspect: Hide type names 2015-09-21 09:56:49 +02:00
slirp
stubs monitor: remove target-specific code from monitor.c 2015-09-16 17:33:32 +02:00
target-alpha
target-arm
target-cris target-cris: update CPU state save/load to use VMStateDescription 2015-09-17 14:31:38 +01:00
target-i386 * Linux header update and cleanup 2015-09-16 18:06:54 +01:00
target-lm32
target-m68k
target-microblaze
target-mips target-mips: improve exception handling 2015-09-18 12:07:24 +01:00
target-moxie
target-openrisc
target-ppc ppc/spapr: Implement H_RANDOM hypercall in QEMU 2015-09-23 10:51:11 +10:00
target-s390x
target-sh4 monitor: remove target-specific code from monitor.c 2015-09-16 17:33:32 +02:00
target-sparc monitor: remove target-specific code from monitor.c 2015-09-16 17:33:32 +02:00
target-tilegx
target-tricore
target-unicore32
target-xtensa monitor: remove target-specific code from monitor.c 2015-09-16 17:33:32 +02:00
tcg tcg/mips: pass oi to tcg_out_tlb_load 2015-09-19 11:53:15 +02:00
tests qapi: New QMP command query-qmp-schema for QMP introspection 2015-09-21 09:56:49 +02:00
trace
ui spice: surface switch fast path requires same format too. 2015-09-21 09:52:07 +02:00
util error: New error_fatal 2015-09-18 14:38:08 +02:00
.exrc
.gitignore qapi: New QMP command query-qmp-schema for QMP introspection 2015-09-21 09:56:49 +02:00
.gitmodules
.mailmap
.travis.yml
accel.c
aio-posix.c
aio-win32.c
arch_init.c
async.c
balloon.c
block.c
blockdev-nbd.c
blockdev.c
blockjob.c
bootdevice.c
bt-host.c
bt-vhci.c
Changelog
CODING_STYLE
configure
COPYING
COPYING.LIB
coroutine-gthread.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
cpu-exec-common.c cpu-exec: Migrate some generic fns to cpu-exec-common 2015-09-16 17:33:33 +02:00
cpu-exec.c cpu-exec: Migrate some generic fns to cpu-exec-common 2015-09-16 17:33:33 +02:00
cpus.c
cputlb.c cputlb: Change tlb_set_dirty() arg to cpu 2015-09-16 17:33:33 +02:00
device-hotplug.c
device_tree.c
disas.c
dma-helpers.c
dump.c
exec.c include/exec: Move cputlb exec.c defs out 2015-09-16 17:33:33 +02:00
gdbstub.c
HACKING
hmp-commands-info.hx hmp: Restore "info pci" 2015-09-22 11:32:37 +02:00
hmp-commands.hx monitor: allow device_del to accept QOM paths 2015-09-22 11:31:56 +02:00
hmp.c
hmp.h
iohandler.c
ioport.c
iothread.c
kvm-all.c kvm: Add kvm system event crash handler 2015-09-16 17:33:32 +02:00
kvm-stub.c
LICENSE
main-loop.c
MAINTAINERS MAINTAINERS: Add "Error reporting" entry 2015-09-18 14:34:39 +02:00
Makefile qapi: New QMP command query-qmp-schema for QMP introspection 2015-09-21 09:56:49 +02:00
Makefile.objs qapi: New QMP command query-qmp-schema for QMP introspection 2015-09-21 09:56:49 +02:00
Makefile.target * Linux header update and cleanup 2015-09-16 18:06:54 +01:00
memory.c memory: Fix bad error handling in memory_region_init_ram_ptr() 2015-09-18 14:39:39 +02:00
memory_mapping.c
module-common.c
monitor.c qapi: New QMP command query-qmp-schema for QMP introspection 2015-09-21 09:56:49 +02:00
nbd.c nbd: release exp->blk after all clients are closed 2015-09-16 17:33:33 +02:00
numa.c Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
os-posix.c
os-win32.c
page_cache.c
qapi-schema.json monitor: allow device_del to accept QOM paths 2015-09-22 11:31:56 +02:00
qdev-monitor.c monitor: allow device_del to accept QOM paths 2015-09-22 11:31:56 +02:00
qdict-test-data.txt
qemu-bridge-helper.c
qemu-char.c qemu-char: Use g_new() & friends where that makes obvious sense 2015-09-16 17:33:33 +02:00
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c
qemu-coroutine.c
qemu-doc.texi monitor: added generation of documentation for hmp-commands-info.hx 2015-09-16 17:33:33 +02:00
qemu-ga.texi
qemu-img-cmds.hx
qemu-img.c
qemu-img.texi
qemu-io-cmds.c
qemu-io.c
qemu-log.c
qemu-nbd.c
qemu-nbd.texi
qemu-options-wrapper.h
qemu-options.h
qemu-options.hx
qemu-seccomp.c
qemu-tech.texi
qemu-timer.c
qemu.nsi
qemu.sasl
qjson.c
qmp-commands.hx monitor: allow device_del to accept QOM paths 2015-09-22 11:31:56 +02:00
qmp.c qom: Don't use 'gen': false for qom-get, qom-set, object-add 2015-09-21 09:56:49 +02:00
qtest.c
README
rules.mak
softmmu_template.h
spice-qemu-char.c
tcg-runtime.c
tci.c tcg: Move tci_tb_ptr to -common 2015-09-16 17:33:33 +02:00
thread-pool.c
thunk.c
tpm.c
trace-events
translate-all.c translate: move real_host_page setting to -common 2015-09-16 17:33:33 +02:00
translate-all.h
translate-common.c translate: move real_host_page setting to -common 2015-09-16 17:33:33 +02:00
user-exec.c
VERSION
version.rc
vl.c machine: Eliminate QEMUMachine and qemu_register_machine() 2015-09-19 16:40:30 +02:00
xen-common-stub.c
xen-common.c
xen-hvm-stub.c
xen-hvm.c Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
xen-mapcache.c

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team