diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-01-06 20:43:38 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-01-06 20:43:38 +0000 |
commit | 02536f8b1f94a701ac3ef8016741fe01cc68cff2 (patch) | |
tree | 934687a15c82863f6187b0ba05ef6a01a2bfdeeb /vl.c | |
parent | 06c2f5066e298d456e4a6ca24def8a84cc9ed31a (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.c | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -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); |