qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [5570] Fix restore of older snapshots for target-i386 on big endian hosts
@ 2008-10-29 14:16 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2008-10-29 14:16 UTC (permalink / raw)
  To: qemu-devel

Revision: 5570
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5570
Author:   aliguori
Date:     2008-10-29 14:16:31 +0000 (Wed, 29 Oct 2008)

Log Message:
-----------
Fix restore of older snapshots for target-i386 on big endian hosts

A target_ulong may be 64-bit.  Passing it to a function expecting a 32-bit
pointer is wrong and unfortunately happens to work for x86.  It won't work on
big endian hosts though.  Change the code to work properly on all hosts.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/target-i386/machine.c

Modified: trunk/target-i386/machine.c
===================================================================
--- trunk/target-i386/machine.c	2008-10-28 18:22:59 UTC (rev 5569)
+++ trunk/target-i386/machine.c	2008-10-29 14:16:31 UTC (rev 5570)
@@ -248,8 +248,8 @@
         qemu_get_betls(f, &env->sysenter_esp);
         qemu_get_betls(f, &env->sysenter_eip);
     } else {
-        qemu_get_be32s(f, &env->sysenter_esp);
-        qemu_get_be32s(f, &env->sysenter_eip);
+        env->sysenter_esp = qemu_get_be32(f);
+        env->sysenter_eip = qemu_get_be32(f);
     }
 
     qemu_get_betls(f, &env->cr[0]);

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

only message in thread, other threads:[~2008-10-29 14:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29 14:16 [Qemu-devel] [5570] Fix restore of older snapshots for target-i386 on big endian hosts Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).