From: Dor Laor <[EMAIL PROTECTED]> Call pause_all_threads() before exiting the i/o thread main loop.
This scenario happened on system_powerdown request: The vcpu eventually makes pm_ioport_writew (soft power off) access that calls qemu_system_shutdown_request. It causes the i/o thread to exit although the vcpu did not exit yet. One of the symptoms is that vcpu may trigger timers thus causing a segfault since the i/o thread stopped the timer. Signed-off-by: Dor Laor <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 50589a7..78127de 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -452,7 +452,9 @@ int kvm_main_loop(void) pthread_mutex_unlock(&qemu_mutex); } + pause_all_threads(); pthread_mutex_unlock(&qemu_mutex); + return 0; } ------------------------------------------------------------------------- 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-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits