Received: by 10.223.185.116 with SMTP id b49csp1914168wrg; Thu, 22 Feb 2018 05:20:34 -0800 (PST) X-Google-Smtp-Source: AH8x224Lu1FTx6SNEgM4MLvNGlDpa8jnN9IH7hIy4C/PSLjsRWjPV5m5CQy6lv3YpsFCkUjkRlcv X-Received: by 10.98.157.18 with SMTP id i18mr6951303pfd.62.1519305633948; Thu, 22 Feb 2018 05:20:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519305633; cv=none; d=google.com; s=arc-20160816; b=g7mkpqzQJFGVmDsUanCMnScJo9Hmaf0brgChpoHpaDGLJcCDJRhz9FJD8/4IfZpcba z0Mhnd8xxhJAqJwx2I6+CVNQ1KjAqYkv7dE/HmsU8lWJ4NB8zIrmmvMHyDCIcIlGVMwm V2p+VQaO6tS5BpcJBHWXJEvMX9tgj44cD9PcTUbjP5SqPEcOELNufW94tAAvG4cLKkzg qGlByiquZ4ww3Y5v/kYT41XQqvGwWWVRIaOXzgbwNFrSinSesUWGn8Sfoch+hSXkrbMU P5x8hGNeD4XyfB8FxchEi+OBjvoEYKucsciaTG67dJf/LxXhEFX+5LUe+oQMioFM4g6w U1Jg== 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:arc-authentication-results; bh=Mcthy8u4yG5PGL0wnbPs9XAESuOZaEPMKClX2upsn2M=; b=cpLjUzgr3JPtWOLFth2+HOJMpK8PlRfs2ElqqqXWijqQ67I8rQJTerUoEkhigGGqKP pdZcFuweqCep56PKBeP8++BSP+esUf84zVCpzaSZjqiHboD96cyGM6fiZ2e7CMz7Wr3h 5nKlzDROfe0FK3+I97K8w9cPodXPvpuT6Ofe2+ynwO2nUmVX3cjwArte0rzVUycVUJyo LUYBcUcz9W5thhRhgnvirzMLAKOgkwCf4GhlaV5fy9/pSvizLWLKJHycjLy+PuzWPAgn MSorqQbx+gh7zXE77LVF4pJnQN9UfyomrDbjJ9wJY90EQuCtnAexo812W/CTfNp0CVzC rlLw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10si25745pgs.523.2018.02.22.05.20.19; Thu, 22 Feb 2018 05:20:33 -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; 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 S932588AbeBVNTU (ORCPT + 99 others); Thu, 22 Feb 2018 08:19:20 -0500 Received: from mga02.intel.com ([134.134.136.20]:42673 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932392AbeBVNTT (ORCPT ); Thu, 22 Feb 2018 08:19:19 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2018 05:19:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,377,1515484800"; d="scan'208";a="36634696" Received: from araj-mobl1.jf.intel.com ([10.254.107.230]) by orsmga002.jf.intel.com with ESMTP; 22 Feb 2018 05:19:18 -0800 Date: Thu, 22 Feb 2018 05:19:18 -0800 From: "Raj, Ashok" To: Borislav Petkov Cc: X86 ML , LKML , Thomas Gleixner , Ingo Molnar , Tony Luck , Andi Kleen , Tom Lendacky , Arjan Van De Ven , Ashok Raj Subject: Re: [v2 1/3] x86/microcode/intel: Check microcode revision before updating sibling threads Message-ID: <20180222131918.GB3797@araj-mobl1.jf.intel.com> References: <1519281205-58951-1-git-send-email-ashok.raj@intel.com> <1519281205-58951-2-git-send-email-ashok.raj@intel.com> <20180222110056.GA27489@pd.tnic> <20180222115554.GA3797@araj-mobl1.jf.intel.com> <20180222121506.GC27489@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180222121506.GC27489@pd.tnic> 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 On Thu, Feb 22, 2018 at 01:15:06PM +0100, Borislav Petkov wrote: > On Thu, Feb 22, 2018 at 03:55:54AM -0800, Raj, Ashok wrote: > > The current code wasn't trying to enforce checking the loaded microcode revision on a thread > > before attempting to load the microcode. While you comeback from resume, if C0T0 already > > is up, and we loaded the early microcode, then when handling C0T1 there is no need to > > do a wrmsrl to reapply microcode since its already loaded as part of C0T0. > > And I'm asking exactly this: is it simply "we don't need to do WRMSR" or > "we should not"? > > Because avoiding the WRMSR costs more than simply doing it and letting > the HT thread ignore the supplied microcode. This isn't a simple WRMSR like others. Microcode engine needs to do a bunch of validation. > > If it is "we don't need to but there's nothing wrong when we do it" then > we don't need this patch. And I'm pretty sure "nothing wrong when we do > it" would be the answer. Otherwise we have bigger problems. In the past the only guidance was to not load microcode at the same time to the thread siblings of a core. We now have new guidance that the sibling must be spinning and not doing other things that can introduce instability around loading microcode. I think its safer to not load when its not required vs forcing a load and depending on the microcode interface to not interfere. If the rules change in future we don't have to adapt again.