From: "Jan Beulich" Subject: Re: Woes of NMIs and MCEs, and possibly how to fix Date: Mon, 03 Dec 2012 08:28:27 +0000 Message-ID: <50BC70BB02000078000AD2DF@nat28.tlf.novell.com> References: <50B8EE13.6070301@citrix.com> <20121130175604.GB95877@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121130175604.GB95877@ocelot.phlegethon.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Tim Deegan Cc: Keir Fraser , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 30.11.12 at 18:56, Tim Deegan wrote: > At 17:34 +0000 on 30 Nov (1354296851), Andrew Cooper wrote: > For the record, we also came up with a much simpler solution, which I > prefer: > - The MCE handler should never return to Xen with IRET. > - The NMI handler should always return with IRET. > - There should be no faulting code in the NMI or MCE handlers. > > That covers all the interesting cases except (3), (4) and (7) below, and > a simple per-cpu {nmi,mce}-in-progress flag will be enough to detect > (and crash) on _almost_ all cases where that bites us (the other cases > will crash less politely from their stacks being smashed). > > Even if we go on to build some more bulletproof solution, I think we > should consider implementing that now, as the baseline. Fully agree. As said in an earlier reply to Andrew's original mail, dealing with (3) and (4) doesn't seem necessary to me. Jan