Commit e5ceb24447ff66e3b472299eac8203439bd0ae4a
1 parent
e41b3910
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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5570 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
target-i386/machine.c
... | ... | @@ -248,8 +248,8 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) |
248 | 248 | qemu_get_betls(f, &env->sysenter_esp); |
249 | 249 | qemu_get_betls(f, &env->sysenter_eip); |
250 | 250 | } else { |
251 | - qemu_get_be32s(f, &env->sysenter_esp); | |
252 | - qemu_get_be32s(f, &env->sysenter_eip); | |
251 | + env->sysenter_esp = qemu_get_be32(f); | |
252 | + env->sysenter_eip = qemu_get_be32(f); | |
253 | 253 | } |
254 | 254 | |
255 | 255 | qemu_get_betls(f, &env->cr[0]); | ... | ... |