qemu-patch-raspberry4/hw/core
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
..
bus.c hw/core/bus.c: Only the main system bus can have no parent 2019-06-13 15:14:03 +01:00
empty_slot.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
fw-path-provider.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
generic-loader.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
hotplug.c call HotplugHandler->plug() as the last step in device realization 2018-10-19 13:44:12 +02:00
irq.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
Kconfig kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
loader-fit.c loader-fit: Wean off error_printf() 2019-04-17 21:21:49 +02:00
loader.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
machine-hmp-cmds.c i386/cpu: Consolidate die-id validity in smp context 2019-07-05 17:08:03 -03:00
machine-qmp-cmds.c qmp: Add deprecation information to query-machines 2019-07-05 17:08:04 -03:00
machine.c virtio-balloon: fix QEMU 4.0 config size migration incompatibility 2019-07-12 10:56:26 -04:00
Makefile.objs qdev: add qdev_add_vm_change_state_handler() 2019-07-08 16:00:26 +02:00
nmi.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
null-machine.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
numa.c numa: allow memory-less nodes when using memdev as backend 2019-07-05 17:12:45 -03:00
or-irq.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
platform-bus.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
ptimer.c ptimer: Add TRIGGER_ONLY_ON_DECREMENT policy option 2018-07-09 14:51:34 +01:00
qdev-fw.c linux-user: remove nmi.c and fw-path-provider.c 2018-01-23 14:20:52 +01:00
qdev-properties-system.c block: Add qdev_prop_drive_iothread property type 2019-06-04 15:22:22 +02:00
qdev-properties.c qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h 2019-06-11 20:22:09 +02:00
qdev.c qapi: Split qom.json and qdev.json off misc.json 2019-07-02 07:19:57 +02:00
register.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
reset.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
split-irq.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
stream.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
sysbus.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
uboot_image.h Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00
vm-change-state-handler.c qdev: add qdev_add_vm_change_state_handler() 2019-07-08 16:00:26 +02:00