I discovered this while testing virtio save/restore this evening. After
sleeping, cpu_single_env can change so we have to make sure to restore it.
This applies on top of my IO thread series.
Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]>
diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index cc8f292..0990af6 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -246,8 +246,11 @@ static void pause_all_threads(void)
vcpu_info[i].stop = 1;
pthread_kill(vcpu_info[i].thread, SIG_IPI);
}
- while (!all_threads_paused())
+ while (!all_threads_paused()) {
+ CPUState *env = cpu_single_env;
pthread_cond_wait(&qemu_pause_cond, &qemu_mutex);
+ cpu_single_env = env;
+ }
}
static void resume_all_threads(void)
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel