Message ID | 20221103175901.164783-12-ashok.raj@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp682388wru; Thu, 3 Nov 2022 11:01:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6epKP+2GobUNj2s3nqw0vWe8KFMdNTMZ4/AGk9GwlQ0fJet/THCQv6zCeB7yAkdslwZ9vt X-Received: by 2002:a17:90b:48c3:b0:213:b5ad:742d with SMTP id li3-20020a17090b48c300b00213b5ad742dmr29024536pjb.172.1667498471305; Thu, 03 Nov 2022 11:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667498471; cv=none; d=google.com; s=arc-20160816; b=fDyttUwaFoJaKZfoCdbT6Y6qc6dsOkSjumYbhr0MV2eM9rb9t9f8yCHACm/5gQsSjo c2r0n7FXxxXoUwt28sGKwz0qblx+sRrmKsXzimgVez8SVwJtVX0XXh/QZHFGLimrlUOu q4aIOrkWPN9AvBzLvDfsHPy4hkHKVIk0L1NUfyIqHuh5wsx5IGcim+JuZ7gwvZBe04nI RwBWIJW9gq35wKnX9uAuOqsqa0c7tfe72JriPxAWzmCSaUOe374BLbVFfujclj+a1277 gaLo3w62K/54Qgb/ws51cv73LFRtBx+l4v5amksHeFMrbxx0JtbjEJpGelh52/v67vIx rmGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BScW8Z8jKiCX3elbaE4+XJThI+jDX+M9RCvDbIrZ8/M=; b=gUAk3SCeE/wCY+STX0Q/OYFWF2hjp5iZXfd2FW9B1nZKAr3GeTi97xMLUeJb+NXtvG wxDemyvd2ykJNamk8VJBbCyM2F79P5YabQ4vg5+v+wu0LkbAvz2azLcX+YumSvp5HdCx rpE6KjrUGEySMj4Ia12XaYTg3o9MHkeprjSpJqT9TR+dUyV3hpzy2Fp00wvgqDT7G7fA lLKjjch26D6DR9l01ONKelPi2vuB4zbU7eTgqSxTlgo1ANkVo59piBA/0V5D2ZV7gCc7 IJ6r9Fb/Uo0dOYLGVCzpcZxF348yzJimN/sq+utIOnllurcVSzKEII1heLmrIkhv+YYq YlzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ar9go5MU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c14-20020a170902d48e00b001729146e418si1681680plg.388.2022.11.03.11.00.57; Thu, 03 Nov 2022 11:01:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ar9go5MU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230205AbiKCSAC (ORCPT <rfc822;yves.mi.zy@gmail.com> + 99 others); Thu, 3 Nov 2022 14:00:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231942AbiKCR71 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Nov 2022 13:59:27 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD6EC219B for <linux-kernel@vger.kernel.org>; Thu, 3 Nov 2022 10:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667498359; x=1699034359; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0V5W1QoeZ7jgTpO6yb+rrh5iM/UlFsilbmyJNleFWWA=; b=ar9go5MU9n8Up/U4gf0nzQpEQzOMzRgdQfWwkvQgxEdfI0JCIxnUUh+y ytyrzLsBpQhk+CpOlxZCpfnMOdfZL8rK73Q0Gw4R26s6HWEh9F5KSDbZC gZzpY6o2B9fzkNua25EucdxRVJZ3kZHYcIQZOERvCGxmQWXvdl3JHuW9I pwr7pzHShrfILTGa5AebMSqo+zoBI5jErx1o86CxaYdSNWaeX46HnPdv4 n7SVpAzbPRHnU96ILYt6wwN1JHaCeJG6dtQwZRkb1IYts+qHzXf0ZjGa1 J1J3W28yKBeiEfTFSnMcEZ0ajZMJcK5uKyg34P6sKMLIfPcYZwAexKlD8 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="310878483" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="310878483" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 10:59:19 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="809762571" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="809762571" Received: from araj-dh-work.jf.intel.com ([10.165.157.158]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 10:59:18 -0700 From: Ashok Raj <ashok.raj@intel.com> To: Borislav Petkov <bp@alien8.de>, Thomas Gleixner <tglx@linutronix.de> Cc: "LKML Mailing List" <linux-kernel@vger.kernel.org>, X86-kernel <x86@kernel.org>, Tony Luck <tony.luck@intel.com>, Dave Hansen <dave.hansen@intel.com>, Arjan van de Ven <arjan.van.de.ven@intel.com>, Andy Lutomirski <luto@kernel.org>, Jacon Jun Pan <jacob.jun.pan@intel.com>, Tom Lendacky <thomas.lendacky@amd.com>, Kai Huang <kai.huang@intel.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Ashok Raj <ashok.raj@intel.com> Subject: [v2 11/13] x86/microcode/intel: Drop wbinvd() from microcode loading Date: Thu, 3 Nov 2022 17:58:59 +0000 Message-Id: <20221103175901.164783-12-ashok.raj@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103175901.164783-1-ashok.raj@intel.com> References: <20221103175901.164783-1-ashok.raj@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748498877093192517?= X-GMAIL-MSGID: =?utf-8?q?1748498877093192517?= |
Series |
Make microcode late loading more robust
|
|
Commit Message
Ashok Raj
Nov. 3, 2022, 5:58 p.m. UTC
Some older processors had a bad interaction when updating microcode if the caches were dirty causing machine checks. The wbinvd() was added to mitigate that before performing microcode updates. Now that Linux checks for the minimum version before performing an update, those microcode revisions can't be loaded. Remove calls to wbinvd(). Reviewed-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Ashok Raj <ashok.raj@intel.com> --- arch/x86/kernel/cpu/microcode/intel.c | 11 ----------- 1 file changed, 11 deletions(-)
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index 5d2ee76cd36c..7086670da606 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -541,11 +541,6 @@ static int apply_microcode_early(struct ucode_cpu_info *uci, bool early) } old_rev = rev; - /* - * Writeback and invalidate caches before updating microcode to avoid - * internal issues depending on what the microcode is updating. - */ - native_wbinvd(); /* write microcode via MSR 0x79 */ native_wrmsrl(MSR_IA32_UCODE_WRITE, (unsigned long)mc->bits); @@ -776,12 +771,6 @@ static enum ucode_state apply_microcode_intel(int cpu) if (!prev_rev) prev_rev = rev; - /* - * Writeback and invalidate caches before updating microcode to avoid - * internal issues depending on what the microcode is updating. - */ - native_wbinvd(); - /* write microcode via MSR 0x79 */ wrmsrl(MSR_IA32_UCODE_WRITE, (unsigned long)mc->bits);