Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5041932ybe; Tue, 17 Sep 2019 01:22:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTfdnTqGzxn+Gc7k40gq1CCgwSv479Ph0ky24qec+zsgT8ZDTrMEn5tPDrjdhdWrmzbfFM X-Received: by 2002:a17:906:5813:: with SMTP id m19mr3523147ejq.246.1568708564433; Tue, 17 Sep 2019 01:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568708564; cv=none; d=google.com; s=arc-20160816; b=p6Viw5flg0cV11tpBn8PslSrZM925lmOMpyQibDx1MNRQcQZpIy7Bb6BSCANG86fM4 wKzotMq6s87GYkG8O/E92jkLNW14oDjnmrC7DjdKHsrFkm3rkzKXoRcl9hg3M/LGASJm WN2qsr9K6DMUXw3vzjZiuYhUlCtzRgI84X6xJQq3AXaxtzHyEHd3dQGz8sKmyxT2+7Mn CBzyGFpylbFWFCgTJEL+7wcWuEMH1PzOgwIfjuJuhztpocDKSSfSI1jx3SyBvHaovwCq XrIg8glARu5dPkU+h7hMJ7M/OZDdpvF2H0RNkeQyRFXgp3WD4b55dT0tKH3+azQeHz1b y98Q== 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=P47hoQCx3560RVrVK+ZnO7r61kUdpDO7puoYJs3ceDU=; b=in0sW8P2absEJTu0P0N+tQRa8wkXT1rVCfKm+wWE0Ou149PvYK0CQv4yIXN9KXUYub ZlgYk0yRYn0cPHOpdg2ileiW7fyB5IrXcyNK7Bg9kWM5vF3FPXJjDFHACpLUVEK+ewko F/LMLYfntzA9CsTjGPKJBA7p5BeRCuIwwMLAMYRfYzylxZe1PVTa4kxSE36TVuLAjYev T5+GE36P1wsnmdkhc76/215h/BDiKUERT548AD5EsDRdZOcwPvpefozcYteqJAagNBTZ NSo5GLNQ83mBCD6Qmro7rKIf0CuSBsEHMwnkJS6coH9akJ9oDTu9ZJCz4cyEWTFYCtbr sSaA== 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 lw10si714667ejb.324.2019.09.17.01.22.21; Tue, 17 Sep 2019 01:22:44 -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 S1730006AbfIQAbY (ORCPT + 99 others); Mon, 16 Sep 2019 20:31:24 -0400 Received: from mga03.intel.com ([134.134.136.65]:5870 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbfIQAbY (ORCPT ); Mon, 16 Sep 2019 20:31:24 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2019 17:31:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,514,1559545200"; d="scan'208";a="187303784" Received: from otc-nc-03.jf.intel.com (HELO otc-nc-03) ([10.54.39.145]) by fmsmga007.fm.intel.com with ESMTP; 16 Sep 2019 17:31:22 -0700 Date: Mon, 16 Sep 2019 17:31:22 -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: <20190917003122.GA3005@otc-nc-03> References: <20190905072029.GB19246@zn.tnic> <20190905194044.GA3663@otc-nc-03> <20190905222706.GA4422@otc-nc-03> <20190906144039.GA29569@sventech.com> <20190907003338.GA14807@araj-mobl1.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 16, 2019 at 12:36:11PM +0200, Thomas Gleixner wrote: > > On Fri, 6 Sep 2019, Raj, Ashok wrote: > > > On Fri, Sep 06, 2019 at 11:16:00PM +0200, Thomas Gleixner wrote: > > > > Now #1 is actually a sensible and feasible solution which can be pulled off > > > > in a reasonably short time frame, avoids all the bound to be ugly and > > > > failure laden attempts of fixing late loading completely and provides a > > > > usable and safe solution for joe user, jack admin and the super experts at > > > > big-cloud corporate. > > > > > > > > That is not requiring any new format of microcode payload, as this can be > > > > nicely done as a metadata package which comes with the microcode > > > > payload. So you get the following backwards compatible states: > > > > > > > > Kernel metadata result > > > > > > > > old don't care refuse late load > > > > > > > > new No refuse late load > > > > > > > > new Yes decide based on metadata > > > > > > > > Thoughts? > > > > > > This is 100% in line with what we proposed... > > > > So what it hindering you to implement that? ucode teams whining about the > > little bit of extra work? > > That said, there is also a distinct lack of information about micro code > loading in a safe way in general. We absolutely do not know whether a micro > code update affects any instruction which might be in use during the update > on a sibling. Right now it's all load and pray and the SDM is not really > helpful with that either. > Guilty as charged :-). In general we do not expect microcode updates to remove any cpuid bits (Not that it hasn't happened, but it slipped through the cracks). 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. 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) Cheers, Ashok