From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTfCU-0001Tq-NX for qemu-devel@nongnu.org; Tue, 08 Oct 2013 17:52:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTfCO-0000fQ-LI for qemu-devel@nongnu.org; Tue, 08 Oct 2013 17:52:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTfCO-0000fG-E4 for qemu-devel@nongnu.org; Tue, 08 Oct 2013 17:52:12 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r98LqA3Q032583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Oct 2013 17:52:11 -0400 Date: Tue, 8 Oct 2013 18:51:55 -0300 From: Marcelo Tosatti Message-ID: <20131008215155.GA16625@amt.cnet> References: <20131008004126.773017235@amt.cnet> <20131008004224.509422315@amt.cnet> <5253BC64.2060105@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5253BC64.2060105@redhat.com> Subject: Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Tue, Oct 08, 2013 at 10:03:48AM +0200, Paolo Bonzini wrote: > Il 08/10/2013 02:41, Marcelo Tosatti ha scritto: > > + /* unblock SIGBUS */ > > + pthread_sigmask(SIG_BLOCK, NULL, &oldset); > > + sigemptyset(&set); > > + sigaddset(&set, SIGBUS); > > + pthread_sigmask(SIG_UNBLOCK, &set, NULL); > > Please instead modify qemu-thread-posix.c to unblock all per-thread > signals (SIGBUS, SIGSEGV, SIGILL, SIGFPE and SIGSYS). There is no need > to keep those blocked. > > Paolo main-loop.c handles SIGBUS via signalfd to emulate MCEs (associated commits). Therefore it must be blocked. Note that what this patch does it to maintain the signal handling state (it saves the previous state, modifies state, restores previous state) so that its unchanged.