WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] cirrus_vga fix save\restore
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 26 Nov 2008 15:40:13 +0000
Delivery-date: Wed, 26 Nov 2008 07:36:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080505)
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] cirrus_vga fix save\restore, Stefano Stabellini <=