aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-06 20:43:38 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-06 20:43:38 +0000
commit02536f8b1f94a701ac3ef8016741fe01cc68cff2 (patch)
tree934687a15c82863f6187b0ba05ef6a01a2bfdeeb /vl.c
parent06c2f5066e298d456e4a6ca24def8a84cc9ed31a (diff)
x86_64 save/restore
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1200 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index c6733ff168..7a4762489a 100644
--- a/vl.c
+++ b/vl.c
@@ -2138,6 +2138,20 @@ void cpu_save(QEMUFile *f, void *opaque)
/* MMU */
qemu_put_be32s(f, &env->a20_mask);
+
+#ifdef TARGET_X86_64
+ for(i = 0; i < CPU_NB_REGS; i++) {
+ qemu_put_be64s(f, &env->xmm_regs[i].XMM_Q(0));
+ qemu_put_be64s(f, &env->xmm_regs[i].XMM_Q(1));
+ }
+
+ qemu_put_be64s(f, &env->efer);
+ qemu_put_be64s(f, &env->star);
+ qemu_put_be64s(f, &env->lstar);
+ qemu_put_be64s(f, &env->cstar);
+ qemu_put_be64s(f, &env->fmask);
+ qemu_put_be64s(f, &env->kernelgsbase);
+#endif
}
int cpu_load(QEMUFile *f, void *opaque, int version_id)
@@ -2198,6 +2212,20 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
/* MMU */
qemu_get_be32s(f, &env->a20_mask);
+#ifdef TARGET_X86_64
+ for(i = 0; i < CPU_NB_REGS; i++) {
+ qemu_get_be64s(f, &env->xmm_regs[i].XMM_Q(0));
+ qemu_get_be64s(f, &env->xmm_regs[i].XMM_Q(1));
+ }
+
+ qemu_get_be64s(f, &env->efer);
+ qemu_get_be64s(f, &env->star);
+ qemu_get_be64s(f, &env->lstar);
+ qemu_get_be64s(f, &env->cstar);
+ qemu_get_be64s(f, &env->fmask);
+ qemu_get_be64s(f, &env->kernelgsbase);
+#endif
+
/* XXX: compute hflags from scratch, except for CPL and IIF */
env->hflags = hflags;
tlb_flush(env, 1);