From: Jan Kiszka <[email protected]>

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 <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>

diff --git a/target-i386/machine.c b/target-i386/machine.c
index 6bd447f..9ac477b 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;
 }
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to