From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754277AbbAEVzE (ORCPT ); Mon, 5 Jan 2015 16:55:04 -0500 Received: from mail-lb0-f176.google.com ([209.85.217.176]:61308 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbbAEVzC (ORCPT ); Mon, 5 Jan 2015 16:55:02 -0500 MIME-Version: 1.0 In-Reply-To: References: <20141124205441.GW5050@linux.vnet.ibm.com> <20141124213501.GX5050@linux.vnet.ibm.com> <20141124223407.GB8512@linux.vnet.ibm.com> <20141124225754.GY5050@linux.vnet.ibm.com> <20141124233101.GA2819@linux.vnet.ibm.com> <20141124235058.GZ5050@linux.vnet.ibm.com> <20141125185803.GC3938@pd.tnic> From: Andy Lutomirski Date: Mon, 5 Jan 2015 13:54:40 -0800 Message-ID: Subject: Re: [PATCH v4 2/5] x86, traps: Track entry into and exit from IST context To: Tony Luck Cc: Borislav Petkov , Paul McKenney , X86 ML , Linus Torvalds , "linux-kernel@vger.kernel.org" , Peter Zijlstra , Oleg Nesterov , Andi Kleen , Josh Triplett , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 5, 2015 at 1:46 PM, Tony Luck wrote: > On Wed, Dec 10, 2014 at 4:24 PM, Andy Lutomirski wrote: >> I think you need ist_begin_non_atomic() before local_irq_enable() and >> ist_end_non_atomic() after local_irq_disable(). Otherwise it should >> be good. > > In your x86/paranoid branch you added: > > prev_state = ist_enter(regs); > .... body of do_machine_check() here ... > ist_exit(regs, prev_state); > > Does that override the previous advice? Or do I still need something before > I call local_irq_enable() and after local_irq_disable()? I think I was just being vague. It would be: prev_state = ist_enter(regs); .... beginning of do_machine_check() here ... if (whatever condition) { ist_begin_non_atomic(); local_irq_enable(); ... local_irq_disable(); ist_end_non_atomic(); ist_exit(regs, prev_state); --Andy > > -Tony -- Andy Lutomirski AMA Capital Management, LLC