From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60880 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pi6JY-0003em-EU for qemu-devel@nongnu.org; Wed, 26 Jan 2011 09:25:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pi6JS-0006QS-Si for qemu-devel@nongnu.org; Wed, 26 Jan 2011 09:25:40 -0500 Received: from goliath.siemens.de ([192.35.17.28]:24831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pi6JS-0006Pf-K6 for qemu-devel@nongnu.org; Wed, 26 Jan 2011 09:25:34 -0500 Message-ID: <4D402ED6.2020300@siemens.com> Date: Wed, 26 Jan 2011 15:25:26 +0100 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] kvm: Prevent dynticks race condition for !CONFIG_IOTHREAD References: <1296034784-6513-1-git-send-email-stefanha@linux.vnet.ibm.com> <4D401DA4.9020307@siemens.com> <4D4027FE.8090808@siemens.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Avi Kivity , Marcelo Tosatti , Stefan Hajnoczi , "qemu-devel@nongnu.org" On 2011-01-26 15:01, Stefan Hajnoczi wrote: > On Wed, Jan 26, 2011 at 1:56 PM, Jan Kiszka wrote: >> Looks like this should also include SIGIO in case hpet is selected as >> host timer. > > Yeah that can't hurt although since hpet is periodic we don't risk > forgetting to rearm the timer. > > Can you explain the signalfd idea a little more? I'm not sure that > model would work for !CONFIG_IOTHREAD. Maybe if QEMU itself uses > signalfd but KVM sigmask is used to unblock the signals during guest > code execution (and a solution for TCG too). Will push a version I would like you to test as well in a few minutes. This is already the concept: As under IOTHREAD, we will block SIGIO and SIGALARM the whole time - except during KVM_RUN - and catch those signals via qemu_signalfd in the main select loop. Of course, this includes setting up the kvm signal mask properly as well (was already part of my previously posted series for other reasons). Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux