aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r--target-i386/machine.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 869c681f4..2b88fea63 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -6,6 +6,7 @@
#include "exec-all.h"
#include "kvm.h"
+#include "qemu-kvm.h"
static const VMStateDescription vmstate_segment = {
.name = "segment",
@@ -323,6 +324,7 @@ static void cpu_pre_save(void *opaque)
int i, bit;
cpu_synchronize_state(env);
+ kvm_save_mpstate(env);
/* FPU */
env->fpus_vmstate = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11;
@@ -384,6 +386,8 @@ static int cpu_post_load(void *opaque, int version_id)
}
tlb_flush(env, 1);
+ kvm_load_mpstate(env);
+
return 0;
}
@@ -475,6 +479,9 @@ static const VMStateDescription vmstate_cpu = {
VMSTATE_UINT64_ARRAY_V(mce_banks, CPUState, MCE_BANKS_DEF *4, 10),
/* rdtscp */
VMSTATE_UINT64_V(tsc_aux, CPUState, 11),
+ /* KVM pvclock msr */
+ VMSTATE_UINT64_V(system_time_msr, CPUState, 12),
+ VMSTATE_UINT64_V(wall_clock_msr, CPUState, 12),
VMSTATE_END_OF_LIST()
}
};