[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] cirrus_vga fix save\restore



Hi all,
this patch fixes the cirrus_vga save\restore functions to keep
compatibility with older ioemu statefiles.

It should be applied to qemu-xen 3.3 as well.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

---

diff -r 0ea6bd53cfb6 hw/cirrus_vga.c
--- a/hw/cirrus_vga.c   Thu Oct 23 10:26:02 2008 +0100
+++ b/hw/cirrus_vga.c   Wed Nov 26 15:27:47 2008 +0000
@@ -3146,12 +3146,12 @@
 
     vga_acc = (!!s->map_addr);
     qemu_put_8s(f, &vga_acc);
+    /* XXX old versions saved rubbish here, keeping for compatibility */
+    qemu_put_be32(f, 0xffffffff);
     qemu_put_be32(f, s->lfb_addr);
     /* XXX old versions saved rubbish here, keeping for compatibility */
     qemu_put_be32(f, 0xffffffff);
     qemu_put_be32(f, s->lfb_end);
-    /* XXX old versions saved rubbish here, keeping for compatibility */
-    qemu_put_be32(f, 0xffffffff);
     qemu_put_be64s(f, &s->stolen_vram_addr);
     if (!s->stolen_vram_addr && !vga_acc)
         /* Old guest: VRAM is not mapped, we have to save it ourselves */
@@ -3208,12 +3208,12 @@
     qemu_get_be32s(f, &s->hw_cursor_y);
 
     qemu_get_8s(f, &vga_acc);
+    /* XXX throwing away 32 bits */
+    qemu_get_be32(f);
     qemu_get_be32s(f, &s->lfb_addr);
     /* XXX throwing away 32 bits */
     qemu_get_be32(f);
     qemu_get_be32s(f, &s->lfb_end);
-    /* XXX throwing away 32 bits */
-    qemu_get_be32(f);
     if (version_id >= 3) {
         qemu_get_be64s(f, &s->stolen_vram_addr);
         if (!s->stolen_vram_addr && !vga_acc) {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.