From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55206 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pjqbc-0002Gm-56 for qemu-devel@nongnu.org; Mon, 31 Jan 2011 05:03:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjqbZ-0001Y2-4d for qemu-devel@nongnu.org; Mon, 31 Jan 2011 05:03:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjqbY-0001Xw-Sz for qemu-devel@nongnu.org; Mon, 31 Jan 2011 05:03:29 -0500 Message-ID: <4D4688EB.30408@redhat.com> Date: Mon, 31 Jan 2011 12:03:23 +0200 From: Avi Kivity MIME-Version: 1.0 References: <4D417F1F.7020302@siemens.com> <4D418230.1010801@siemens.com> In-Reply-To: <4D418230.1010801@siemens.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v3 14/22] kvm: Fix race between timer signals and vcpu entry under !IOTHREAD List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org, Stefan Hajnoczi On 01/27/2011 04:33 PM, Jan Kiszka wrote: > Found by Stefan Hajnoczi: There is a race in kvm_cpu_exec between > checking for exit_request on vcpu entry and timer signals arriving > before KVM starts to catch them. Plug it by blocking both timer related > signals also on !CONFIG_IOTHREAD and process those via signalfd. > > As this fix depends on real signalfd support (otherwise the timer > signals only kick the compat helper thread, and the main thread hangs), > we need to detect the invalid constellation and abort configure. > > Signed-off-by: Jan Kiszka > CC: Stefan Hajnoczi > --- > > I don't want to invest that much into !IOTHREAD anymore, so let's see if > the proposed catch&abort is acceptable. > I don't understand the dependency on signalfd. The normal way of doing things, either waiting for the signal in sigtimedwait() or in ioctl(KVM_RUN), works with SIGALRM just fine. -- error compiling committee.c: too many arguments to function