summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-12-03 19:21:01 +0100
committerAvi Kivity <avi@redhat.com>2009-12-06 11:52:24 +0200
commit8fcb8652956b94c5196a9627dfc16590313c0f84 (patch)
tree329547e25007332a518bab633cc36bc602c9c0a7 /target-i386
parentDrop pcbios submodule (diff)
downloadqemu-kvm-8fcb8652956b94c5196a9627dfc16590313c0f84.tar.gz
qemu-kvm-8fcb8652956b94c5196a9627dfc16590313c0f84.tar.bz2
qemu-kvm-8fcb8652956b94c5196a9627dfc16590313c0f84.zip
Fix mismerge in cpu_post_load
Merge 8e2c5ec2f6 forgot to restore some qemu-kvm-specific hooks in cpu_post_load. mp_state was readded later on, but tsc was missing, breaking the guest timing after resume. Also, reset of halt was dropped which is obviously required for in-kernel irqchip. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/machine.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 6bd447fbf..9ac477b35 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -366,7 +366,15 @@ static int cpu_post_load(void *opaque, int version_id)
hw_breakpoint_insert(env, i);
tlb_flush(env, 1);
- kvm_load_mpstate(env);
+
+ if (kvm_enabled()) {
+ /* when in-kernel irqchip is used, env->halted causes deadlock
+ because no userspace IRQs will ever clear this flag */
+ env->halted = 0;
+
+ kvm_load_tsc(env);
+ kvm_load_mpstate(env);
+ }
return 0;
}