All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cirrus_vga fix save\restore
@ 2008-11-26 15:40 Stefano Stabellini
  0 siblings, 0 replies; only message in thread
From: Stefano Stabellini @ 2008-11-26 15:40 UTC (permalink / raw)
  To: xen-devel

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@eu.citrix.com>

---

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) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-26 15:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-26 15:40 [PATCH] cirrus_vga fix save\restore Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.