From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA2A3C4332F for ; Fri, 14 Oct 2022 20:10:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231351AbiJNUKN (ORCPT ); Fri, 14 Oct 2022 16:10:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231140AbiJNUJl (ORCPT ); Fri, 14 Oct 2022 16:09:41 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F2FB31F8E for ; Fri, 14 Oct 2022 13:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665778173; x=1697314173; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2pjEdcguM+RaAzdUc4p+bz90Q4KG/RsiJEhTjRZleaQ=; b=npHVmWxfTdptITY47HoMqIntmM7g1nVijUfHg1VqaDEolGt0oKbtYJTN g1K+pfLj5hFMbMWojG4mOTozkHKVPi0AxjJ1h2hjyNhit9OpW1/HVlU8L fdLKTlDPVzU/3UA3XT3pQ58miwuEYF/WMmRgL7iBiiSIAjoJXq8SgDPkO C/TjI0IYNhkShJiYD6ECoIjN4TZoyY4zWsSPpfmVTbPZlMMSxUhI2agl6 N7JItK5ldqimjAtQ9JAVMYYUZVsUjVG+QqlXeC87O/g4Q1dVZJLS46JKW e/SREhT00iqMtJebf1Ug9IwQWQrPRPtlVfrFJF7wBGH2ipHARi6qrrgUw A==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="304202163" X-IronPort-AV: E=Sophos;i="5.95,185,1661842800"; d="scan'208";a="304202163" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2022 13:09:29 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="716870168" X-IronPort-AV: E=Sophos;i="5.95,185,1661842800"; d="scan'208";a="716870168" Received: from araj-ucode.jf.intel.com ([10.23.0.19]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2022 13:09:29 -0700 From: Ashok Raj To: Borislav Petkov , Thomas Gleixner Cc: Tony Luck , Dave Hansen , LKML Mailing List , X86-kernel , Tom Lendacky , Arjan van de Ven , Jacob Jun Pan , Ashok Raj Subject: [PATCH 10/13] x86/microcode/intel: Drop wbinvd() from microcode loading Date: Fri, 14 Oct 2022 13:09:10 -0700 Message-Id: <20221014200913.14644-11-ashok.raj@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221014200913.14644-1-ashok.raj@intel.com> References: <20221014200913.14644-1-ashok.raj@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Ashok Raj --- 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 c8ee53fcf04d..c61aa661ac2f 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); @@ -773,12 +768,6 @@ static enum ucode_state apply_microcode_intel(int cpu) goto out; } - /* - * 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); -- 2.34.1