If we use Qcow img to boot SMP guest, windows guest may hang , since the vcpu thread which does AIO will wait for the signal SIGUSR2 which may be eated by vcpu 0 's thread. So this patch removes SIGUSR2 from io_sigset and masks it in vcpu 0's thread, it can let the guest boot successfully.
>From e8e97f71c6e67daae57cecef369167f65aae8b9c Mon Sep 17 00:00:00 2001 From: Feng (Eric) Liu <[EMAIL PROTECTED]> Date: Tue, 15 Jan 2008 12:05:37 -0500 Subject: [PATCH] kvm: qemu: remove SIGUSR2 from io_sigset To avoid breaking Aio with qcow, remove SIGUSR2 from io_sigset, and mask it in all vcpu's threads. Signed-off-by: Feng (Eric) Liu <[EMAIL PROTECTED]> --- qemu/qemu-kvm.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index dd84686..063d14f 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -310,9 +310,10 @@ static void setup_kernel_sigmask(CPUState *env) sigprocmask(SIG_BLOCK, NULL, &set); sigdelset(&set, SIG_IPI); - if (env->cpu_index == 0) + if (env->cpu_index == 0) { + sigaddset(&set, SIGUSR2); sigandset(&set, &set, &io_negsigset); - + } kvm_set_signal_mask(kvm_context, env->cpu_index, &set); } @@ -391,7 +392,6 @@ int kvm_init_ap(void) sigfillset(&io_negsigset); kvm_add_signal(SIGIO); kvm_add_signal(SIGALRM); - kvm_add_signal(SIGUSR2); if (!kvm_irqchip_in_kernel(kvm_context)) kvm_add_signal(SIG_IPI); --Eric (Liu, Feng)
0001-kvm-qemu-remove-SIGUSR2-from-io_sigset.patch
Description: 0001-kvm-qemu-remove-SIGUSR2-from-io_sigset.patch
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel