Subject: [PATCH 17/18] acpi/piix4: Enable qemu-kvm compatibility mode

From: Eduardo Habkost <[email-masked]>
Date: Wed, 16 Oct 2013 13:07:15 +0200

RH-Author: Eduardo Habkost <[email-masked]>
Message-id: <[email-masked]>
Patchwork-id: 54961
O-Subject: [qemu-kvm RHEL-7 PATCH] acpi/piix4: Enable qemu-kvm compatibility mode
Bugzilla: 1019474
RH-Acked-by: Paolo Bonzini <[email-masked]>
RH-Acked-by: Orit Wasserman <[email-masked]>
RH-Acked-by: Igor Mammedov <[email-masked]>

Bugzilla: 1019474
Scratch build: https://brewweb.devel.redhat.com/taskinfo?taskID=6426533
Upstream status: not applicable

>From the code comments:

  qemu-kvm 1.2 uses version 3 but advertised as 2
  To support incoming qemu-kvm 1.2 migration, change version_id
  and minimum_version_id to 2 below (which breaks migration from
  qemu 1.2).

The v2 format of qemu-0.13 (implemented by upstream commit
4cf3e6f3d85492f20a773dd6c9068ab89ba24a18, and the one that was used on
qemu-kvm) is not compatible with the v2 format of qemu-0.15 and newer
(compatibility was broken by upstream commit
23910d3f669d46073b403876e30a7314599633af). RHEL-6 is using the former
format (RHEL-6 commit c4101c5340988caa68da87066a88d3871c8c4bf1), which
is not compatible with upstream QEMU.

This sets minimum_version_id to 2, so we enable the qemu-kvm
compatibility mode, to allow us to load RHEL-6 migration data.

Signed-off-by: Eduardo Habkost <[email-masked]>
---
 hw/acpi/piix4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Signed-off-by: Miroslav Rezanina <[email-masked]>
---
 hw/acpi/piix4.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 86ff598..f14867a 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -278,7 +278,7 @@ static int acpi_load_old(QEMUFile *f, void *opaque, int version_id)
 static const VMStateDescription vmstate_acpi = {
     .name = "piix4_pm",
     .version_id = 3,
-    .minimum_version_id = 3,
+    .minimum_version_id = 2,
     .minimum_version_id_old = 1,
     .load_state_old = acpi_load_old,
     .post_load = vmstate_acpi_post_load,
-- 
1.7.1