qemu/include/hw
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
..
acpi acpi: Remove unused definition. 2015-09-10 11:21:21 +03:00
arm i.MX: Add GPIO devices to i.MX25 SOC 2015-09-14 14:39:49 +01:00
audio
block
char i.MX: Split UART emulator in a header file and a source file 2015-08-13 11:26:19 +01:00
cpu
cris
gpio i.MX: Add GPIO device 2015-09-14 14:39:49 +01:00
i2c i.MX: Add I2C controller emulator 2015-09-07 10:39:30 +01:00
i386 xen-2015-09-10 2015-09-10 18:25:52 +01:00
input
intc hw/intc/arm_gic_common: Configure IRQs as NS if doing direct NS kernel boot 2015-09-08 17:38:43 +01:00
ipack
isa i8257: remove cpu_request_exit irq 2015-09-09 15:34:53 +02:00
kvm
lm32
m68k
mem pc,pc-dimm: Factor out reusable parts in pc_dimm_plug to a separate routine 2015-07-03 17:47:58 -03:00
mips net/dp8393x: QOM'ify 2015-06-11 10:13:30 +01:00
misc i.MX: Split CCM emulator in a header file and a source file 2015-08-13 11:26:20 +01:00
net i.MX: Add FEC Ethernet Emulator 2015-09-07 10:39:30 +01:00
nvram
pci hw/pci-assign: split pci-assign.c 2015-09-10 12:04:27 +00:00
pci-host spapr: Merge sPAPREnvironment into sPAPRMachineState 2015-07-07 17:44:50 +02:00
ppc ppc/spapr: Implement H_RANDOM hypercall in QEMU 2015-09-23 10:51:11 +10:00
s390x s390/sclp: store the increment_size in the sclp device 2015-09-07 16:10:44 +02:00
scsi
sh4
smbios smbios: add smbios 3.0 support 2015-09-07 10:39:28 +01:00
sparc
timer i.MX: Split GPT emulator in a header file and a source file 2015-08-13 11:26:20 +01:00
tricore
unicore32
usb
vfio hw/vfio/platform: add irqfd support 2015-07-06 12:15:14 -06:00
virtio virtio: avoid leading underscores for helpers 2015-09-10 11:06:05 +03:00
watchdog s390x/watchdog: introduce diag288 watchdog device 2015-06-11 17:45:49 +02:00
xen xen-2015-09-10 2015-09-10 18:25:52 +01:00
boards.h machine: Eliminate QEMUMachine and qemu_register_machine() 2015-09-19 16:40:30 +02:00
bt.h
compat.h virtio: set any_layout in virtio core 2015-07-27 11:24:48 +03:00
devices.h
elf_ops.h
empty_slot.h
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h
loader.h vl: move rom_load_all after machine init done 2015-07-07 11:03:16 +02:00
nmi.h nmi: Implement inject_nmi() for non-monitor context use 2015-06-11 17:45:50 +02:00
pcmcia.h
platform-bus.h
ptimer.h
qdev-core.h qdev: Un-deprecate qdev_init_nofail() 2015-06-19 19:14:32 +02:00
qdev-dma.h
qdev-properties.h qdev: fix 64 bit properties 2015-07-13 14:42:24 +03:00
qdev.h
sd.h
ssi.h
stream.h
sysbus.h sysbus: add irq_routing_notifier 2015-07-06 12:15:14 -06:00
usb.h