Make sure that all threads are paused in userspace before saving machine state.
Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> --- kvm-userspace.io/qemu/qemu-kvm.c +++ kvm-userspace.io/qemu/qemu-kvm.c @@ -244,7 +244,7 @@ static int all_threads_paused(void) int i; for (i = 0; i < smp_cpus; ++i) - if (vcpu_info[i].stopped) + if (vcpu_info[i].stop) return 0; return 1; } @@ -257,8 +257,12 @@ 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()) { + pthread_mutex_unlock(&qemu_mutex); kvm_eat_signal(&io_signal_table, NULL, 1000); + pthread_mutex_lock(&qemu_mutex); + cpu_single_env = NULL; + } } 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 kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel