From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAhl2-0004PY-FV for qemu-devel@nongnu.org; Fri, 25 Jul 2014 11:50:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAhkp-0004Og-HG for qemu-devel@nongnu.org; Fri, 25 Jul 2014 11:50:08 -0400 From: Igor Mammedov Date: Fri, 25 Jul 2014 15:48:56 +0000 Message-Id: <1406303338-13212-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH for-2.1 0/2] Fix migration failure due to ACPI tables size changes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mst@redhat.com, qemu-stable@nongnu.org, dgilbert@redhat.com, pbonzini@redhat.com, lersek@redhat.com 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 | 19 ++++++++++++++----- exec.c | 15 +++++++++------ hw/core/loader.c | 6 +++++- hw/i386/acpi-build.c | 2 +- include/exec/cpu-all.h | 15 ++++++++++++++- include/exec/memory.h | 10 ++++++++++ include/exec/ram_addr.h | 1 + include/hw/loader.h | 5 +++-- memory.c | 5 +++++ 9 files changed, 62 insertions(+), 16 deletions(-) -- 1.8.3.1