From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUI0C-0003Bb-Md for qemu-devel@nongnu.org; Thu, 10 Oct 2013 11:18:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUI07-0004Du-Mm for qemu-devel@nongnu.org; Thu, 10 Oct 2013 11:18:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUI07-0004Dq-Cw for qemu-devel@nongnu.org; Thu, 10 Oct 2013 11:18:07 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9AFI60n005588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Oct 2013 11:18:06 -0400 Date: Wed, 9 Oct 2013 23:11:39 -0300 From: Marcelo Tosatti Message-ID: <20131010021139.GB7060@amt.cnet> References: <20131008004126.773017235@amt.cnet> <20131008004224.509422315@amt.cnet> <5253BC64.2060105@redhat.com> <20131008215155.GA16625@amt.cnet> <52550E58.6030106@redhat.com> <20131009194109.GA16670@amt.cnet> <5255CA22.30107@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5255CA22.30107@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 Wed, Oct 09, 2013 at 11:26:58PM +0200, Paolo Bonzini wrote: > Il 09/10/2013 21:41, Marcelo Tosatti ha scritto: > >> > How was that tested? For BUS_MCEERR_AO it can work, but BUS_MCEERR_AR > >> > calls force_sig_info which does this: > >> > > >> > ignored = action->sa.sa_handler == SIG_IGN; > >> > blocked = sigismember(&t->blocked, sig); > >> > if (blocked || ignored) { > >> > action->sa.sa_handler = SIG_DFL; > >> > if (blocked) { > >> > sigdelset(&t->blocked, sig); > >> > recalc_sigpending_and_wake(t); > >> > } > >> > > >> > if (action->sa.sa_handler == SIG_DFL) > >> > t->signal->flags &= ~SIGNAL_UNKILLABLE; > >> > > >> > and kills the process (because that's the default action of SIG_DFL). > > For vcpu context its not blocked? > > It causes KVM to exit back to userspace, but as soon as KVM exits it > should be blocked. Thus a SIGBUS with BUS_MCEERR_AR will never be > returned by sigtimedwait. Its blocked but readable via signalfd. Its generated when vcpu touches memory, see 77db5cbd29b7cb0e0fb4fd14. Since its rarely used, reviewing the code is not a bad idea. For the test, see https://lists.nongnu.org/archive/html/qemu-devel/2011-01/msg01588.html.