qemu-patch-raspberry4/hw
David Gibson 33face6b89 spapr: Capabilities infrastructure
Because PAPR is a paravirtual environment access to certain CPU (or other)
facilities can be blocked by the hypervisor.  PAPR provides ways to
advertise in the device tree whether or not those features are available to
the guest.

In some places we automatically determine whether to make a feature
available based on whether our host can support it, in most cases this is
based on limitations in the available KVM implementation.

Although we correctly advertise this to the guest, it means that host
factors might make changes to the guest visible environment which is bad:
as well as generaly reducing reproducibility, it means that a migration
between different host environments can easily go bad.

We've mostly gotten away with it because the environments considered mature
enough to be well supported (basically, KVM on POWER8) have had consistent
feature availability.  But, it's still not right and some limitations on
POWER9 is going to make it more of an issue in future.

This introduces an infrastructure for defining "sPAPR capabilities".  These
are set by default based on the machine version, masked by the capabilities
of the chosen cpu, but can be overriden with machine properties.

The intention is at reset time we verify that the requested capabilities
can be supported on the host (considering TCG, KVM and/or host cpu
limitations).  If not we simply fail, rather than silently modifying the
advertised featureset to the guest.

This does mean that certain configurations that "worked" may now fail, but
such configurations were already more subtly broken.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
2018-01-17 09:35:24 +11:00
..
9pfs 9pfs: deprecate handle backend 2018-01-08 11:18:23 +01:00
acpi Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
adc maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
alpha Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
arm hw/arm/virt: Add virt-2.12 machine type 2018-01-16 13:28:10 +00:00
audio misc: remove old i386 dependency 2017-12-18 17:07:02 +03:00
block maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
bt bt: stop the sdp memory allocation craziness 2017-08-01 17:27:33 +02:00
char maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
core Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
cpu hw: use "qemu/osdep.h" as first #include in source files 2017-12-18 17:07:02 +03:00
cris cris: use generic cpu_model parsing 2017-10-27 16:03:54 +02:00
display * QemuMutex tracing improvements (Alex) 2018-01-16 15:45:15 +00:00
dma maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
gpio hw/gpio/omap_gpio.c: Don't use old_mmio 2017-09-21 16:34:27 +01:00
i2c * QemuMutex tracing improvements (Alex) 2018-01-16 15:45:15 +00:00
i386 * QemuMutex tracing improvements (Alex) 2018-01-16 15:45:15 +00:00
ide hw/ide: Emulate SiI3112 SATA controller 2018-01-10 12:53:00 +11:00
input Split adb.c into adb.c, adb-mouse.c and adb-kbd.c 2017-12-21 20:11:28 +01:00
intc hw/intc/armv7m: Support byte and halfword accesses to CFSR 2018-01-16 13:28:09 +00:00
ipack pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
ipmi hw/ipmi: remove old i386 dependency 2017-12-18 17:07:02 +03:00
isa Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
lm32 lm32: lm32_boards: use generic cpu_model parsing 2017-10-27 16:03:54 +02:00
m68k m68k: mcf5208: use generic cpu_model parsing 2017-10-27 16:03:54 +02:00
mem spapr: replace numa_get_node() with lookup in pc-dimm list 2017-12-15 09:49:24 +11:00
microblaze hw: Use new memory_region_init_{ram, rom, rom_device}() functions 2017-07-14 17:59:42 +01:00
mips Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
misc maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
moxie hw/moxie/moxiesim: Add support for loading a BIOS on moxiesim 2017-12-21 09:30:31 +01:00
net * QemuMutex tracing improvements (Alex) 2018-01-16 15:45:15 +00:00
nios2 nios2: remove duplicated includes (in code commented out) 2017-12-18 17:07:02 +03:00
nvram mips: fix potential fopen(NULL,...) 2018-01-16 14:54:50 +01:00
openrisc openrisc: use generic cpu_model parsing 2017-10-27 16:03:54 +02:00
pci pci: Eliminate pci_find_primary_bus() 2017-12-05 19:13:45 +02:00
pci-bridge Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
pci-host Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc spapr: Capabilities infrastructure 2018-01-17 09:35:24 +11:00
s390x Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
scsi * QemuMutex tracing improvements (Alex) 2018-01-16 15:45:15 +00:00
sd sdhci: add a 'dma' property to the sysbus devices 2018-01-16 13:28:21 +00:00
sh4 pci: Rename root bus initialization functions for clarity 2017-12-05 19:13:45 +02:00
smbios Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
sparc sun4m: remove include/hw/sparc/sun4m.h and all references to it 2018-01-09 21:48:20 +00:00
sparc64 sun4u_iommu: add trace event for IOMMU translations 2018-01-09 21:48:20 +00:00
ssi maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
timer maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
tpm maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
tricore tricore: use generic cpu_model parsing 2017-10-27 16:04:27 +02:00
unicore32 hw/unicore32: restrict hw addr defines to source file 2017-12-18 17:07:02 +03:00
usb Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
vfio Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
virtio Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
watchdog misc: drop old i386 dependency 2017-12-18 17:07:03 +03:00
xen Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
xenpv xenfb: remove xen_init_display "temporary" hack 2017-07-07 11:10:03 -07:00
xtensa xtensa: lx60/lx200/ml605/kc705: use generic cpu_model parsing 2017-10-27 16:04:27 +02:00
Makefile.objs 9pfs: fix dependencies 2017-08-30 18:23:25 +02:00