qemu/hw/i386
Paolo Bonzini 07fb61760c pc: hack for migration compatibility from QEMU 2.0
Changing the ACPI table size causes migration to break, and the memory
hotplug work opened our eyes on how horribly we were breaking things in
2.0 already.

The ACPI table size is rounded to the next 4k, which one would think
gives some headroom.  In practice this is not the case, because the user
can control the ACPI table size (each CPU adds 97 bytes to the SSDT and
8 to the MADT) and so some "-smp" values will break the 4k boundary and
fail to migrate.  Similarly, PCI bridges add ~1870 bytes to the SSDT.

This patch concerns itself with fixing migration from QEMU 2.0.  It
computes the payload size of QEMU 2.0 and always uses that one.
The previous patch shrunk the ACPI tables enough that the QEMU 2.0 size
should always be enough; non-AML tables can change depending on the
configuration (especially MADT, SRAT, HPET) but they remain the same
between QEMU 2.0 and 2.1, so we only compute our padding based on the
sizes of the SSDT and DSDT.

Migration from QEMU 1.7 should work for guests that have a number of CPUs
other than 12, 13, 14, 54, 55, 56, 97, 98, 139, 140.  It was already
broken from QEMU 1.7 to QEMU 2.0 in the same way, though.

Even with this patch, QEMU 1.7 and 2.0 have two different ideas of
"-M pc-i440fx-2.0" when there are PCI bridges.  Igor sent a patch to
adopt the QEMU 1.7 definition.  I think distributions should apply
it if they move directly from QEMU 1.7 to 2.1+ without ever packaging
version 2.0.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-07-28 23:02:39 +02:00
..
kvm Revert "kvmclock: Ensure time in migration never goes backward" 2014-07-18 15:28:03 +02:00
xen savevm: Remove all the unneeded version_minimum_id_old (x86) 2014-06-16 04:55:26 +02:00
acpi-build.c pc: hack for migration compatibility from QEMU 2.0 2014-07-28 23:02:39 +02:00
acpi-build.h i386: ACPI table generation code from seabios 2013-10-14 17:48:57 +03:00
acpi-defs.h acpi: fix endian-ness for table ids 2014-03-18 16:46:07 +02:00
acpi-dsdt-cpu-hotplug.dsl dsdt: tweak ACPI ID for hotplug resource device 2014-04-08 15:22:59 +03:00
acpi-dsdt-dbug.dsl i386: add ACPI table files from seabios 2013-10-14 17:48:51 +03:00
acpi-dsdt-hpet.dsl ACPI: Remove commented-out code from HPET._CRS 2014-02-10 11:09:33 +02:00
acpi-dsdt-isa.dsl ACPI: Fix AppleSMC _STA size 2014-01-26 13:06:48 +02:00
acpi-dsdt-pci-crs.dsl pc: Q35 DSDT: exclude CPU hotplug IO range from PCI bus resources 2014-01-26 13:11:44 +02:00
acpi-dsdt.dsl acpi-dsdt: procedurally generate _PRT 2014-07-28 23:02:39 +02:00
acpi-dsdt.hex.generated acpi-dsdt: procedurally generate _PRT 2014-07-28 23:02:39 +02:00
bios-linker-loader.c i386: Add missing include file for QEMU_PACKED 2014-02-01 13:43:52 +04:00
bios-linker-loader.h i386: add bios linker/loader 2013-10-14 17:48:52 +03:00
kvmvapic.c savevm: Remove all the unneeded version_minimum_id_old (x86) 2014-06-16 04:55:26 +02:00
Makefile.objs pc: acpi: do not hardcode preprocessor 2014-06-19 18:44:21 +03:00
multiboot.c multiboot: Calculate upper_mem in the ROM 2013-06-28 14:01:52 -05:00
multiboot.h
pc_piix.c pc: hack for migration compatibility from QEMU 2.0 2014-07-28 23:02:39 +02:00
pc_q35.c pc: hack for migration compatibility from QEMU 2.0 2014-07-28 23:02:39 +02:00
pc_sysfw.c hw/i386/pc_sysfw: support two flash drives 2013-12-23 13:12:34 +02:00
pc.c pc & q35: Add new machine opt max-ram-below-4g 2014-06-23 18:02:41 +03:00
q35-acpi-dsdt.dsl pc: ACPI BIOS: make GPE.3 handle memory hotplug event on PIIX and Q35 machines 2014-06-19 16:41:52 +03:00
q35-acpi-dsdt.hex.generated acpi: update generated files 2014-06-19 16:41:52 +03:00
smbios.c smbios: use g_free directly on NULL pointers 2014-06-10 19:39:34 +04:00
ssdt-mem.dsl pc: ACPI BIOS: implement memory hotplug interface 2014-06-19 16:41:51 +03:00
ssdt-mem.hex.generated acpi: update generated files 2014-06-19 16:41:52 +03:00
ssdt-misc.dsl pc: ACPI BIOS: implement memory hotplug interface 2014-06-19 16:41:51 +03:00
ssdt-misc.hex.generated acpi: update generated files 2014-06-19 16:41:52 +03:00
ssdt-pcihp.dsl acpi-build: append description for non-hotplug 2014-03-09 21:09:30 +02:00
ssdt-pcihp.hex.generated acpi: update generated files 2014-06-19 16:41:52 +03:00
ssdt-proc.dsl ssdt: fix PBLK length 2013-10-14 17:48:57 +03:00
ssdt-proc.hex.generated acpi: update generated files 2014-06-19 16:41:52 +03:00