summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r--target-i386/machine.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 47ca6e856..0b8a33afd 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -323,7 +323,10 @@ static void cpu_pre_save(void *opaque)
int i;
cpu_synchronize_state(env);
- kvm_save_mpstate(env);
+ if (kvm_enabled()) {
+ kvm_save_mpstate(env);
+ kvm_get_vcpu_events(env);
+ }
/* FPU */
env->fpus_vmstate = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11;
@@ -374,6 +377,7 @@ static int cpu_post_load(void *opaque, int version_id)
kvm_load_tsc(env);
kvm_load_mpstate(env);
+ kvm_put_vcpu_events(env);
}
return 0;