Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757115Ab0GRSoF (ORCPT ); Sun, 18 Jul 2010 14:44:05 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:50552 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757025Ab0GRSoB (ORCPT ); Sun, 18 Jul 2010 14:44:01 -0400 X-Authority-Analysis: v=1.1 cv=g9Y3NohClm0xo0Au7hiKM/lwvZwqTqjWC8eysRFNA3U= c=1 sm=0 a=ZI5MULQygNwA:10 a=7U3hwN5JcxgA:10 a=Q9fys5e9bTEA:10 a=gMqfjgEr1zLu/65IO0LwxA==:17 a=Sq3EUCS3E7k_EMHr108A:9 a=1qQa-TZagDt7Pa8O1sc6oPLk3OsA:4 a=PUjeQqilurYA:10 a=gMqfjgEr1zLu/65IO0LwxA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 74.67.89.75 Subject: Re: [patch 1/2] x86_64 page fault NMI-safe From: Steven Rostedt Reply-To: rostedt@goodmis.org To: Linus Torvalds Cc: Avi Kivity , Mathieu Desnoyers , LKML , Andrew Morton , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Frederic Weisbecker , Thomas Gleixner , Christoph Hellwig , Li Zefan , Lai Jiangshan , Johannes Berg , Masami Hiramatsu , Arnaldo Carvalho de Melo , Tom Zanussi , KOSAKI Motohiro , Andi Kleen , "H. Peter Anvin" , Jeremy Fitzhardinge , "Frank Ch. Eigler" , Tejun Heo In-Reply-To: References: <20100714154923.947138065@efficios.com> <20100714155804.049012415@efficios.com> <20100714170617.GB4955@Krystal> <20100714203940.GC22096@Krystal> <20100714222115.GA30122@Krystal> <4C42DF9A.5090908@redhat.com> Content-Type: text/plain; charset="ISO-8859-15" Organization: Kihon Technologies Inc. Date: Sun, 18 Jul 2010 14:43:50 -0400 Message-ID: <1279478630.12913.15.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1432 Lines: 36 On Sun, 2010-07-18 at 11:17 -0700, Linus Torvalds wrote: > Oh, and the non-nested case obviously needs all the regular "make the > kernel state look right" code. Like the swapgs stuff etc if required. > My example code was really meant to just document the nesting > handling, not the existing stuff we already need to do with > save_paranoid etc. > > And I really think it should work, but I'd again like to stress that > it's just a RFD code sequence with no testing what-so-ever etc. > Are you sure you don't want to use Mathieu's 2/2 patch? We are fixing the x86 problem that iret re-enables NMIs, and you don't want to touch anything else but the NMI code. But it may be saner to just fix the places that call iret. We can perhaps encapsulate those into a single macro that we can get right and will be correct everywhere it is used. The ugliest part of Mathieu's code is dealing with paravirt, but paravirt is ugly to begin with. Doing this prevents nested NMIs as well as all the unknowns that will come with dealing with nested NMIs. Where as, handling all iret's should be straight forward, although a bit more intrusive than what we would like. Just saying, -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/