Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 385

kvm-83-270.el5_11.src.rpm

From b4294916b1fc3fc789478d8c73017666969f2ec4 Mon Sep 17 00:00:00 2001
From: Juan Quintela <quintela@redhat.com>
Date: Fri, 31 Jul 2009 19:01:48 +0200
Subject: [PATCH] ide calls register_savevm() three times for pci_ide_save/load

Hi

In this commit, it was changed the save/load version for ide to 3 in only 1 place,
but pci_ide_save/load is called from three places.  This patch fixes it.

commit ee49f80b360dd57acc61df1694fc7ea798ffa485
Author: Gleb Natapov <gleb@redhat.com>
Date:   Wed Jul 29 19:15:11 2009 +0300

As funny as it can get, the problem that we are fixing is that keyboard didn't worked
after migration.  If you really like strange bugs :)

Later, Juan.

bugzilla 514887

[ehabkost: more detailed description from Markus Armbruster below]

ide.c defines a couple of chips: ISA, CMD646, PIIX3, PIIX4,
PowerMac, MMIO, DSCM-1XXXX.

Gleb's commit changed pci_ide_save() and pci_ide_load() to put/get an
additional four bytes.  The two functions are used with CMD646, PIIX3
and PIIX3.  The commit bumped the savevm version_id only for CMD646, not
for PIIX3 and PIIX4.  Juan's patch bumps the other two.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <1249059708-32209-1-git-send-email-quintela@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Bugzilla: 514887
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
---
 qemu/hw/ide.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu/hw/ide.c b/qemu/hw/ide.c
index e991162..1e6b2b4 100644
--- a/qemu/hw/ide.c
+++ b/qemu/hw/ide.c
@@ -3381,7 +3381,7 @@ void pci_piix3_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn,
     qemu_register_reset(piix3_reset, d);
     piix3_reset(d);
 
-    register_savevm("ide", 0, 2, pci_ide_save, pci_ide_load, d);
+    register_savevm("ide", 0, 3, pci_ide_save, pci_ide_load, d);
 }
 
 /* hd_table must contain 4 block drivers */
@@ -3420,7 +3420,7 @@ void pci_piix4_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn,
     qemu_register_reset(piix3_reset, d);
     piix3_reset(d);
 
-    register_savevm("ide", 0, 2, pci_ide_save, pci_ide_load, d);
+    register_savevm("ide", 0, 3, pci_ide_save, pci_ide_load, d);
 }
 
 /***********************************************************/
-- 
1.6.3.rc4.29.g8146