qemu-patch-raspberry4/hw/virtio
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
..
Kconfig virtio-pmem: add virtio device 2019-07-02 12:59:22 -04:00
Makefile.objs virtio-pci: Proxy for virtio-pmem 2019-07-04 17:00:32 -04:00
trace-events hw/virtio/virtio-mmio: Convert DPRINTF to trace and log 2019-05-22 15:33:20 +02:00
vhost-backend.c vhost-net: revamp configure logic 2019-02-21 12:28:01 -05:00
vhost-scsi-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
vhost-stub.c vhost-user: simplify vhost_user_init/vhost_user_cleanup 2019-03-12 21:22:31 -04:00
vhost-user-blk-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
vhost-user-input-pci.c Add vhost-user-input-pci 2019-05-10 14:52:47 +02:00
vhost-user-scsi-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
vhost-user.c vhost-user: add vhost_user_gpu_set_socket() 2019-05-29 06:29:07 +02:00
vhost-vsock-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
vhost-vsock.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
vhost.c vhost: fix vhost_log size overflow during migration 2019-06-16 16:16:52 -04:00
virtio-9p-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-balloon-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-balloon.c virtio-balloon: fix QEMU 4.0 config size migration incompatibility 2019-07-12 10:56:26 -04:00
virtio-blk-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-bus.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-crypto-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-crypto.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-input-host-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-input-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-mmio.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-net-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-pci.c virtio-pci: fix missing device properties 2019-07-04 17:00:32 -04:00
virtio-pci.h virtio-pci: Allow to specify additional interfaces for the base type 2019-07-02 12:59:22 -04:00
virtio-pmem-pci.c virtio-pci: Proxy for virtio-pmem 2019-07-04 17:00:32 -04:00
virtio-pmem-pci.h virtio-pci: Proxy for virtio-pmem 2019-07-04 17:00:32 -04:00
virtio-pmem.c virtio-pmem: add virtio device 2019-07-02 12:59:22 -04:00
virtio-rng-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-rng.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-scsi-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-serial-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio.c virtio-scsi: restart DMA after iothread 2019-07-08 16:00:26 +02:00