qemu/include/hw
Stefan Hajnoczi 2bbadb08ce virtio-balloon: fix QEMU 4.0 config size migration incompatibility
The virtio-balloon config size changed in QEMU 4.0 even for existing
machine types.  Migration from QEMU 3.1 to 4.0 can fail in some
circumstances with the following error:

  qemu-system-x86_64: get_pci_config_device: Bad config data: i=0x10 read: a1 device: 1 cmask: ff wmask: c0 w1cmask:0

This happens because the virtio-balloon config size affects the VIRTIO
Legacy I/O Memory PCI BAR size.

Introduce a qdev property called "qemu-4-0-config-size" and enable it
only for the QEMU 4.0 machine types.  This way <4.0 machine types use
the old size, 4.0 uses the larger size, and >4.0 machine types use the
appropriate size depending on enabled virtio-balloon features.

Live migration to and from old QEMUs to QEMU 4.1 works again as long as
a versioned machine type is specified (do not use just "pc"!).

Originally-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20190710141440.27635-1-stefanha@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-07-12 10:56:26 -04:00
..
acpi hw/acpi: extract acpi_add_rom_blob() 2019-06-16 16:16:52 -04:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
arm hw/misc/aspeed_xdma: New device 2019-07-01 17:29:00 +01:00
audio Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
block Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
char Normalize position of header guard 2019-06-12 13:20:20 +02:00
core hw/core/split-irq: Device that splits IRQ lines 2018-03-02 11:03:45 +00:00
cpu Clean up includes 2019-05-13 08:58:55 +02:00
cris char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
display edid: add xmax + ymax properties 2019-06-13 09:34:38 +02:00
dma Normalize position of header guard 2019-06-12 13:20:20 +02:00
firmware machine: Refactor smp-related call chains to pass MachineState 2019-07-05 17:07:36 -03:00
gpio hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheral 2019-01-07 15:23:47 +00:00
hyperv hyperv: process POST_MESSAGE hypercall 2018-10-19 13:44:14 +02:00
i2c hw/i2c/bitbang_i2c: Use in-place rather than malloc'd bitbang_i2c_interface struct 2019-07-03 10:51:35 +02:00
i386 i386: Make unversioned CPU models be aliases 2019-07-05 17:08:04 -03:00
ide hw/ide: drop iov field from IDEDMA 2019-02-22 09:42:13 +00:00
input hw/devices: Move TI touchscreen declarations into a new header 2019-04-29 17:57:21 +01:00
intc Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
isa Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
kvm Supply missing header guards 2019-06-12 13:20:21 +02:00
lm32 Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
m68k Supply missing header guards 2019-06-12 13:20:21 +02:00
mem nvdimm: Rename AcpiNVDIMMState into NVDIMMState 2019-03-11 10:44:21 -03:00
mips Supply missing header guards 2019-06-12 13:20:21 +02:00
misc hw/misc/aspeed_xdma: New device 2019-07-01 17:29:00 +01:00
net Normalize position of header guard 2019-06-12 13:20:20 +02:00
nvram hw/nvram/fw_cfg: Add fw_cfg_arch_key_name() 2019-05-23 14:10:31 +02:00
pci pcie: consistent names for function args 2019-07-12 10:56:26 -04:00
pci-bridge Supply missing header guards 2019-06-12 13:20:21 +02:00
pci-host ppc patch queue 2019-06-12 2019-06-12 14:43:47 +01:00
ppc spapr/xive: simplify spapr_irq_init_device() to remove the emulated init 2019-07-02 09:43:58 +10:00
rdma {hmp, hw/pvrdma}: Expose device internals via monitor interface 2019-03-16 15:52:44 +02:00
riscv hw/riscv: Add support for loading a firmware 2019-06-27 02:47:06 -07:00
s390x vfio-ccw: support async command subregion 2019-06-24 17:27:57 +02:00
scsi scsi-disk: Use qdev_prop_drive_iothread 2019-06-04 15:22:22 +02:00
sd Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
semihosting semihosting: split console_out into string and char versions 2019-06-12 17:53:22 +01:00
sh4 Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
sparc Supply missing header guards 2019-06-12 13:20:21 +02:00
ssi aspeed/smc: add a 'sdram_base' property 2019-07-01 17:28:59 +01:00
timer hw: timer: Add ASPEED RTC device 2019-07-01 17:28:59 +01:00
tricore Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
unicore32 hw/unicore32: restrict hw addr defines to source file 2017-12-18 17:07:02 +03:00
usb usb: Add basic code to emulate Chipidea USB IP 2018-02-09 10:40:30 +00:00
vfio vfio-common.h: Remove inaccurate comment 2019-07-02 13:12:53 -06:00
virtio virtio-balloon: fix QEMU 4.0 config size migration incompatibility 2019-07-12 10:56:26 -04:00
watchdog aspeed: Link SCU to the watchdog 2019-07-01 17:29:00 +01:00
xen xen: Import other xen/io/*.h 2019-06-24 10:42:30 +01:00
xtensa Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
boards.h machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse() 2019-07-05 17:08:04 -03:00
bt.h char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
elf_ops.h elf-ops.h: Add get_elf_note_type() 2019-02-05 16:50:16 +01:00
empty_slot.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
fw-path-provider.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
hotplug.h qom: make interface types abstract 2018-12-11 15:45:22 -02:00
hw.h Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
ide.h ide/via: Rename functions to match device name 2019-01-25 14:52:12 -05:00
irq.h hw/core/split-irq: Device that splits IRQ lines 2018-03-02 11:03:45 +00:00
loader-fit.h Use #include "..." for our own headers, <...> for others 2018-02-09 05:05:11 +01:00
loader.h elf: Add optional function ptr to load_elf() to parse ELF notes 2019-02-05 16:50:16 +01:00
nmi.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
or-irq.h hw/core/or-irq: Support more than 16 inputs to an OR gate 2018-06-15 15:23:34 +01:00
pcmcia.h hw/pcmcia: Remove PCMCIACardState from "qemu/typedefs.h" 2019-01-22 05:14:32 +01:00
platform-bus.h platform-bus-device: use device plug callback instead of machine_done notifier 2018-05-10 18:10:56 +01:00
ptimer.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qdev-core.h qdev: add qdev_add_vm_change_state_handler() 2019-07-08 16:00:26 +02:00
qdev-dma.h Supply missing header guards 2019-06-12 13:20:21 +02:00
qdev-properties.h block: Add qdev_prop_drive_iothread property type 2019-06-04 15:22:22 +02:00
qdev.h
register.h hw: register: Run post_write hook on reset 2018-03-01 11:05:43 +00:00
registerfields.h Use #include "..." for our own headers, <...> for others 2018-02-09 05:05:11 +01:00
stream.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
sysbus.h sysbus: add a sysbus_mmio_unmap() helper 2019-05-29 11:39:46 +10:00
usb.h qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00