Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6209982ybv; Tue, 18 Feb 2020 12:05:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwUyEjVzb5dkete3LE/htIWVz8bb85Po5/JEENGLw3+chbkFkWkG/cBp7ffpcRQHM6qfoQL X-Received: by 2002:aca:f587:: with SMTP id t129mr2271569oih.143.1582056321304; Tue, 18 Feb 2020 12:05:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582056321; cv=none; d=google.com; s=arc-20160816; b=s8s9I7usLgZGTd/J3Ju4KsgLlNEeXnRmouteaCMwIYAxWDUIMDfa6kVjGMgfGJYKY5 P7EzdVk/OOn2NPEYPAccTWbCccZ9GE4wqJFtDjoNVomF9c2o0UNQ1yxcHvvybD4OzV5n A5cbnmJxivb86pl5ankFgAh1z4CaBw3YgYdZAsjQuKVCINcTWZmPblxlNsSxXWXd2cLu L1qu9zEd/6LGBQwM+vKNoamCWAJYUY7AFk1NTCbR06Mr6PwZJmZeRLO0r6BT0Su/yf3U EHTKqmLucxSlzp+fu9C4Bk5sfETy0ZnlPgvVMlJcTOvrr5aOZKI9AUOuRzlHHSw2qHxw K5hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nflWPq7ESAKoZ8WQ7+riCNATlDHNhjAjlMMNmDflZoc=; b=Dy6FczV8Lz3h5dKp58aGpZP5v/vYaTCp+2dSp0DvfyW4rxY+m0pN6du3Ef8AMXvJdQ icmSYipRCf4aD8mFR8+3gbDmL70HAMni1Uo8R9DTeW9abs9+FLFSVaH8hpJ2c8njL1wG NlnEY7CD4WGlxdOI1Dbp9qFVdAfKXum2JQQA3kb2vrxB59BXGVdWcNO9AyQHMnuKCoAz 6QUpP3U4Jo5SCri0sKssgi0Xo7Im60Hmy6K8exb/R3GC/xD1rg9UkkrP56FTfv990u8j eWwaNnZehaI3JQWEwlH4c+kA8Pg02wAS38W0ycF3ms6qqF/+izCtcoXReWEG1dcKx2UN 37QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=keBX26ap; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q126si8541203oia.8.2020.02.18.12.05.09; Tue, 18 Feb 2020 12:05:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=keBX26ap; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726521AbgBRUCS (ORCPT + 99 others); Tue, 18 Feb 2020 15:02:18 -0500 Received: from merlin.infradead.org ([205.233.59.134]:33412 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728889AbgBRUCO (ORCPT ); Tue, 18 Feb 2020 15:02:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nflWPq7ESAKoZ8WQ7+riCNATlDHNhjAjlMMNmDflZoc=; b=keBX26apztDdU/WjI1j5MVdoNG y+VJeT25XRIJUA2ASCzPloyrTWWwXvuTkm6kaJa2MytIz2YT9Jv9WO1ov/qZ4BJlIUcpj0QpL9wOo IXBUOh61TD6WULU4WzQcXP8ajtgSpfe41ZNUb7ZpmC1AAv9B+gnkIaHw2Zp5iv0KaaUsqbsoaXyEa xSENlv8Jn8O9lCa0uZTsnY3lOalDE5XKm6AiE7qt9m1QzAO9hw0TWz9AdJHWeoX9YOiuBrjYBZu5k s7qARYURK3u1zw9Ww3/isi6pUUCyBqatNg00vscFBeh1K+acCha0VUpjrLnpYlKyyasBNrUIXDRKQ xPWbyAEA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j494C-0005MH-Nc; Tue, 18 Feb 2020 20:02:00 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 3B687980E53; Tue, 18 Feb 2020 21:02:00 +0100 (CET) Date: Tue, 18 Feb 2020 21:02:00 +0100 From: Peter Zijlstra To: "Luck, Tony" Cc: Borislav Petkov , Steven Rostedt , Andy Lutomirski , x86-ml , lkml Subject: Re: [RFC] #MC mess Message-ID: <20200218200200.GE11457@worktop.programming.kicks-ass.net> References: <20200218173150.GK14449@zn.tnic> <3908561D78D1C84285E8C5FCA982C28F7F57B937@ORSMSX115.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F7F57B937@ORSMSX115.amr.corp.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 18, 2020 at 06:20:38PM +0000, Luck, Tony wrote: > > Anything else I'm missing? It is likely... > > + hw_breakpoint_disable(); > + static_key_disable(&__tracepoint_read_msr.key); > + tracing_off(); > + > ist_enter(regs); > > How about some code to turn all those back on for a recoverable (where we actually recovered) #MC? Then please rewrite the #MC entry code to deal with nested exceptions unmasking the MCE, very similr to NMI. The moment you allow tracing, jump_labels or anything else you can expect #PF, #BP and probably #DB while inside #MC, those will then IRET and re-enable the #MC. The current situation is completely and utterly buggered.