Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758031Ab0GNXCt (ORCPT ); Wed, 14 Jul 2010 19:02:49 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:34941 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753187Ab0GNXCr (ORCPT ); Wed, 14 Jul 2010 19:02:47 -0400 MIME-Version: 1.0 In-Reply-To: <4C3E3F77.1090109@goop.org> References: <20100714154923.947138065@efficios.com> <20100714155804.049012415@efficios.com> <20100714170617.GB4955@Krystal> <20100714203940.GC22096@Krystal> <20100714222115.GA30122@Krystal> <4C3E3F77.1090109@goop.org> Date: Wed, 14 Jul 2010 16:02:10 -0700 Message-ID: Subject: Re: [patch 1/2] x86_64 page fault NMI-safe From: Linus Torvalds To: Jeremy Fitzhardinge Cc: Mathieu Desnoyers , LKML , Andrew Morton , Ingo Molnar , Peter Zijlstra , Steven Rostedt , 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" , "Frank Ch. Eigler" , Tejun Heo Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1470 Lines: 31 On Wed, Jul 14, 2010 at 3:51 PM, Jeremy Fitzhardinge wrote: > > We screw around with iret because there's a separate interrupt mask flag > which can't be set atomically with respect to a stack/ring change (well, > there's more to it, but I won't confuse matters). Umm, I know. It's what this whole discussion (non-paravirtualized) is all about. And I have a suggestion that should fix the non-paravirtualized case _without_ actually touching anything but the NMI code itself. What I tried to say is that the paravirtualized people should take a look at my suggestion, and see if they can apply the logic to their NMI handling too. And in the process totally remove the need for paravirtualizing iret, exactly because the approach handles the magic NMI lock logic entirely in the NMI handler itself. Because I think the same thing that would make us not need to worry about nested page faults _during_ NMI (because we could make the NMI code do the right thing even when the hardware doesn't lock out NMI's for us) is also the exact same logic that the paravirt monitor could do for its own NMI handling. Wouldn't it be nice to be able to remove the need to paravirtualize iret? Linus -- 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/