[Spice-commits] Branch 'spice.kvm.v18' - 3 commits - hw/qxl.c target-i386/machine.c

Gerd Hoffmann kraxel at kemper.freedesktop.org
Wed Sep 1 05:44:43 PDT 2010


 hw/qxl.c              |   18 +++++++++++-------
 target-i386/machine.c |    3 ++-
 2 files changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 54d0367fe78cb0140ea270a46ccc0083dc32c837
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Wed Sep 1 14:39:12 2010 +0200

    qxl: migration fix #1
    
    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.

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;
commit 5fc898ef93b0e88313f9ad242509e17d74b95741
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Wed Sep 1 14:09:02 2010 +0200

    [rhel6 compat] fix xsave patch

diff --git a/target-i386/machine.c b/target-i386/machine.c
index d76a0e6..5c73a2a 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -474,8 +474,8 @@ static const VMStateDescription vmstate_cpu = {
         VMSTATE_UINT64_V(xcr0, CPUState, 12),
         VMSTATE_UINT64_V(xstate_bv, CPUState, 12),
         VMSTATE_YMMH_REGS_VARS(ymmh_regs, CPUState, CPU_NB_REGS, 12),
-        VMSTATE_END_OF_LIST()
 #endif
+        VMSTATE_END_OF_LIST()
         /* The above list is not sorted /wrt version numbers, watch out! */
     }
 };
commit f018056b39ffbe737dc5ea2196dcc48e47f093cf
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Wed Sep 1 13:49:34 2010 +0200

    [rhel6 compat] drop xsave migration support.

diff --git a/target-i386/machine.c b/target-i386/machine.c
index 4398801..d76a0e6 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -469,12 +469,13 @@ static const VMStateDescription vmstate_cpu = {
         /* KVM pvclock msr */
         VMSTATE_UINT64_V(system_time_msr, CPUState, 11),
         VMSTATE_UINT64_V(wall_clock_msr, CPUState, 11),
-
+#if 0
         /* XSAVE related fields */
         VMSTATE_UINT64_V(xcr0, CPUState, 12),
         VMSTATE_UINT64_V(xstate_bv, CPUState, 12),
         VMSTATE_YMMH_REGS_VARS(ymmh_regs, CPUState, CPU_NB_REGS, 12),
         VMSTATE_END_OF_LIST()
+#endif
         /* The above list is not sorted /wrt version numbers, watch out! */
     }
 };


More information about the Spice-commits mailing list