[Spice-devel] [PATCH 30/35] qxl: migration fix #1

alexl at redhat.com alexl at redhat.com
Thu Sep 9 10:16:13 PDT 2010


From: Gerd Hoffmann <kraxel at redhat.com>

The pointer to the modes table must be updated in post-load when
migrating between spice 0.4 and spice 0.6.

Note: rhel-6.0.z needs that one too.
---
 hw/qxl.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 0f7f778..6c76bdc 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1307,6 +1307,17 @@ static int qxl_post_load(void *opaque, int version)
     int in, out, i, newmode;
 
     dprint(d, 1, "%s: start\n", __FUNCTION__);
+
+    assert(d->last_release_offset < d->vga.vram_size);
+    if (d->last_release_offset == 0) {
+        d->last_release = NULL;
+    } else {
+        d->last_release = (QXLReleaseInfo *)(ram_start + d->last_release_offset);
+    }
+
+    d->modes = (QXLModes*)((uint8_t*)d->rom + d->rom->modes_offset);
+
+    dprint(d, 1, "%s: restore more\n", __FUNCTION__);
     newmode = d->mode;
     d->mode = QXL_MODE_UNDEFINED;
     switch (newmode) {
@@ -1349,13 +1360,6 @@ static int qxl_post_load(void *opaque, int version)
     }
     dprint(d, 1, "%s: done\n", __FUNCTION__);
 
-    assert(d->last_release_offset < d->vga.vram_size);
-    if (d->last_release_offset == 0) {
-        d->last_release = NULL;
-    } else {
-        d->last_release = (QXLReleaseInfo *)(ram_start + d->last_release_offset);
-    }
-
     /* spice 0.4 compatibility -- accept but ignore */
     qemu_free(d->worker_data);
     d->worker_data = NULL;
-- 
1.7.0.1



More information about the Spice-devel mailing list