Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5631138ybe; Tue, 17 Sep 2019 11:00:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaLZUyPo6BE7ER/1/uPL8hDpHuza4Hycc1Kg5bJoayh/5EmoR4qr5fHJNvfq85qK9vTnsC X-Received: by 2002:a50:cfc7:: with SMTP id i7mr5858985edk.89.1568743209842; Tue, 17 Sep 2019 11:00:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568743209; cv=none; d=google.com; s=arc-20160816; b=R2cs0o8ZuOi9KrXB7M+lvEE31QZHgpN5f/RcblVYmlmSuN56g4HWqc2CGSIuSd49NR G/L0eYgHEvECd2wz2AVKg6TV8Rv4OB+XFd0MMHd6B8EgO/JkV9WgRGcjoGvPfR9o2NA/ 24enhPNc4hYA7ErsvB5pgXey4Sza5Oamjtu3BWBgCIumIthkAI92D5C4DI4BqzYl94w3 quX6Or5yEZrFLKz6hGjeCkMpe3mpN7soK7l8tZaHV+7hMS+QOeJn5RMvA/OqsCzFakuS lDV0IWzhyna8tdQrSu7Tx55sVCxUEIE6mUKAXfqn/mwCVxzZfmUy2rini7DKefK3I5LK hlqg== 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; bh=kaHV3DIuhj3AytNmNAlx9Y4H2lCtjZCpQ8kamCFOu4I=; b=muFCqYtdphwgONLRaB/QzEfyNSavx+8j3FnlXAlt3apiKat9Mq9iMSv6B4ru+CuYWR vFpWeq9KIt6e9JZKrcrBkN/ktuUtgtUeu/bWnMYOZICNCu68pD6O5yzJhImHyjtpANBE omxQPEiC9DbNNrwMxFDBUXAJ9YvKmXrMOd2413WZ7xV/U6xZQe7LgWuWyCVVlKpl3cwC guiOGBFMO6f+1+ivEoGIEcCr/CNTyvcPeRXDFkCg539boMmk3lr1avPu4M8sSh6yjrL/ gtelFOiiZOebn2L58yT+DsYtF7YAwxJVYHqV5nU2/GsRJfqlVs/KvIJFUBckulFAbhPw tOPw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si1912855edc.224.2019.09.17.10.59.46; Tue, 17 Sep 2019 11:00:09 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728047AbfIQO3w (ORCPT + 99 others); Tue, 17 Sep 2019 10:29:52 -0400 Received: from mga06.intel.com ([134.134.136.31]:41108 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727939AbfIQO3w (ORCPT ); Tue, 17 Sep 2019 10:29:52 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2019 07:29:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,516,1559545200"; d="scan'208";a="386556305" Received: from araj-mobl1.jf.intel.com ([10.251.156.66]) by fmsmga005.fm.intel.com with ESMTP; 17 Sep 2019 07:29:50 -0700 Date: Tue, 17 Sep 2019 07:29:50 -0700 From: "Raj, Ashok" To: Thomas Gleixner Cc: Johannes Erdfelt , Borislav Petkov , Boris Ostrovsky , Mihai Carabas , "H. Peter Anvin" , Ingo Molnar , Jon Grimm , kanth.ghatraju@oracle.com, konrad.wilk@oracle.com, patrick.colp@oracle.com, Tom Lendacky , x86-ml , linux-kernel@vger.kernel.org, Ashok Raj Subject: Re: [PATCH] x86/microcode: Add an option to reload microcode even if revision is unchanged Message-ID: <20190917142949.GA28218@araj-mobl1.jf.intel.com> References: <20190905222706.GA4422@otc-nc-03> <20190906144039.GA29569@sventech.com> <20190907003338.GA14807@araj-mobl1.jf.intel.com> <20190917003122.GA3005@otc-nc-03> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On Tue, Sep 17, 2019 at 08:37:10AM +0200, Thomas Gleixner wrote: > > microode updates should be of 3 types. > > > > - Only loadable from BIOS (Only via FIT tables) > > - Suitable for early load (things that take cpuid bits for e.g.) > > - Suitable for late-load. (Where no cpuid bits should change etc). > > > > Today the way we load after a stop_machine() all threads in the system are > > held hostage until all the cores have done the update. The thread sibling > > is also in the rendezvous loop. > > I know. See below. > > > Do you think we still have that risk with a sibling thread? > > (Assuming future ucodes don't do weird things like what happened in > > that case where a cpuid was removed via an update) > > Well, yes. The sibling executes a limited set of instructions in a loop, > but it might be hit by an NMI or MCE which executes even more instructions. There is a plan to solve the NMI issue. Although there is one case we might be showing as a spurious that might not be nice. If #MCE's showup there is nothing we can do at that point. These are most likely unrecoverable. But we want to make sure we could atleast follow through with a proper reset. Let me gather my thoughts on that when i have the patch ready to handle those senarios. > > So what happens if the ucode update "fixes" one of the executed > instructions on the fly? Is that guaranteed to be safe? There is nothing > which says so. > > A decade ago I experimented with putting the spinning CPUs into MWAIT, > which caused havoc. Did neither have time nor the stomach to dig into that > further, but the ucode update _did_ fix an issue with MWAIT according to > the version history. Excellent point. > > That's why I'm worried about instructions being "fixed" which are executed > in parallel on the sibling. > > An authorative statement vs. that would be appreciated. Preferrably in form > of an extension of the SDM, but an upfront statement in this thread would > be a good start. I have started the conversation internally. Once we have something solid I'll share in the list, and also follow up with updates to SDM. Cheers, Ashok