summary refs log tree commit diff stats
path: root/target-i386/machine.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r--target-i386/machine.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 55716fe561..69a03a4df1 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -4,6 +4,7 @@
 #include "hw/isa.h"
 
 #include "exec-all.h"
+#include "kvm.h"
 
 static void cpu_put_seg(QEMUFile *f, SegmentCache *dt)
 {
@@ -29,6 +30,8 @@ void cpu_save(QEMUFile *f, void *opaque)
     int32_t a20_mask;
     int i;
 
+    cpu_synchronize_state(env, 0);
+
     for(i = 0; i < CPU_NB_REGS; i++)
         qemu_put_betls(f, &env->regs[i]);
     qemu_put_betls(f, &env->eip);
@@ -321,5 +324,6 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
     /* XXX: compute redundant hflags bits */
     env->hflags = hflags;
     tlb_flush(env, 1);
+    cpu_synchronize_state(env, 1);
     return 0;
 }