Changes since v2: - addressed Laszlo's comments * fixing typos, rewording comments * dropping enum-ification of RAMBlock flags * adding zeroing out destination ramblock * replacing 'if' with assert() 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.
To trigger issue start QEMU-1.7 with -M pc-i440fx-1.7 -device pci-bridge,chassis_nr=1 and try to migrate to QEMU-2.1 or QEMU-2.0 as result target will fail with: qemu-system-x86_64: Length mismatch: /rom@etc/acpi/tables: 2000 in != 3000 This fix allows target QEMU to load smaller RAMBlock into a bigger one and fixes regression which was introduced since 2.0, allowing forward migration from 1.7/2.0 to 2.1 Fix is also suitable for stable-2.0. Igor Mammedov (2): migration: load smaller RAMBlock to a bigger one if permitted acpi: mark ACPI tables ROM blob as extend-able on migration arch_init.c | 22 +++++++++++++++++----- exec.c | 8 ++++++++ hw/core/loader.c | 6 +++++- hw/i386/acpi-build.c | 2 +- include/exec/memory.h | 11 +++++++++++ include/exec/ram_addr.h | 3 +++ include/hw/loader.h | 5 +++-- memory.c | 5 +++++ 8 files changed, 53 insertions(+), 9 deletions(-) -- 1.8.3.1