Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754747AbbLDSan (ORCPT ); Fri, 4 Dec 2015 13:30:43 -0500 Received: from mga14.intel.com ([192.55.52.115]:25189 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbbLDSal (ORCPT ); Fri, 4 Dec 2015 13:30:41 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,380,1444719600"; d="scan'208";a="7642193" From: "Luck, Tony" To: Borislav Petkov CC: "Raj, Ashok" , "linux-kernel@vger.kernel.org" , "linux-edac@vger.kernel.org" , "Andy Lutomirski (luto@amacapital.net)" Subject: RE: [Patch V0] x86, mce: Ensure offline CPU's don't participate in mce rendezvous process. Thread-Topic: [Patch V0] x86, mce: Ensure offline CPU's don't participate in mce rendezvous process. Thread-Index: AQHRLiCdo/bgn7szpEmDKgCl8H5CG567a4EAgAAsxwD///mJAP//fuxggACNwID//3uPgAARX/eAABAAWkA= Date: Fri, 4 Dec 2015 18:30:39 +0000 Message-ID: <3908561D78D1C84285E8C5FCA982C28F39F79055@ORSMSX114.amr.corp.intel.com> References: <1449188170-3909-1-git-send-email-ashok.raj@intel.com> <20151204143404.GF21177@pd.tnic> <20151204171419.GA4870@otc-brkl-03.jf.intel.com> <20151204165112.GI21177@pd.tnic> <3908561D78D1C84285E8C5FCA982C28F39F78AD9@ORSMSX114.amr.corp.intel.com> <20151204173633.GK21177@pd.tnic> <3908561D78D1C84285E8C5FCA982C28F39F78D9F@ORSMSX114.amr.corp.intel.com> <20151204180001.GL21177@pd.tnic> In-Reply-To: <20151204180001.GL21177@pd.tnic> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id tB4IUmro024210 Content-Length: 988 Lines: 26 > Whether it is kosher or not is beside the point. Why should an offlined > CPU even noodle through all that code if it doesn't need/have to? It can > return immediately instead. Ashok wants to move in stage 2 to having the offline cpu scan banks and report any errors seen there. To do that we'll have to run through a fair bit of the do_machine_check() code. But ... if you want a super safe version to put the stable tag on ... we could just have something like this at the head of do_machine_check() int cpu = smp_processor_id(); if (cpu_is_offline(cpu)) { rdmsr(MCG_STATUS); if (RIPV bit set) { wrmsr(MCG_STATUS, 0); return; } // can we do anything here? Offline cpu has no place to return to. // There are no good answers ... falling into the regular code is // what we did historically } -Tony ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?