x86_64 save/restore

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1200 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2005-01-06 20:43:38 +00:00
parent 06c2f5066e
commit 02536f8b1f

28
vl.c
View File

@ -2138,6 +2138,20 @@ void cpu_save(QEMUFile *f, void *opaque)
/* MMU */ /* MMU */
qemu_put_be32s(f, &env->a20_mask); 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) 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 */ /* MMU */
qemu_get_be32s(f, &env->a20_mask); 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 */ /* XXX: compute hflags from scratch, except for CPL and IIF */
env->hflags = hflags; env->hflags = hflags;
tlb_flush(env, 1); tlb_flush(env, 1);