Received: by 10.223.185.116 with SMTP id b49csp6342850wrg; Wed, 28 Feb 2018 07:54:14 -0800 (PST) X-Google-Smtp-Source: AH8x226062ppCf7s5We6cqNi9FmA7Ak4waTu4Ts+856rlz8mmKQ/5ZRrbyFoWXPXZA29MW5o+o2D X-Received: by 10.98.217.211 with SMTP id b80mr18440080pfl.107.1519833254174; Wed, 28 Feb 2018 07:54:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519833254; cv=none; d=google.com; s=arc-20160816; b=f833LJVxKkd4Hh0F0+6AG+Bvs+RTm7uGorWD67Kfx60W5Aqstbj9ipKTR7shmp22Ry 0qoOe0G9P93cjLXhFjFh92ZFWd8AFLnQ1khSV8UGx70+uP4D5/7euXQLuyDgQyUDEXSL 0FNspI01MJ2Kj9aa7+snei4KMnyNTCemo4TjppkD8W1/c9ibilMUzK3aGLJFRImFm0fv QkP48XUFOiKKT1MOrZ/VTRKu0nBqAo4V4VrF2QTDyTXG2aVn5dirZwQHSx3eiTh+e2MH QoIQe6cd+iUOYMQS0Y9zhR3pHFrC5BphSmc/USplJ8Wjbss8lq5CbNwMc5z2GC6y3FVb Ma5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=pNtD+TSb4GKt8+PHCVpJmK4U0jcIzVwVw4Gdwl99QBU=; b=pofwZf33uBVUPtBznsM3HyjnV9VumH0cvGKTzeqe8CsnkU9z+cq7BDy/sNxQweDM3f lL/RnG0Wcxo4lSKH04BvqsQ1+9BU0+trcAhJ5rlbcZqdHif73W56rvsP7P70+D1HZ1xN l1FK3zGTSxh7NFIn4W4UjXePEg9PaHsDQ5Atc5t5+XSlFHbA+9bD34yIGSqUAHyjS5Uf Kjtnbg8cRXT+7Yg0GcSbDgo3nEhNpMN2mnehdxJZAoihGT/A38Zk2oaeTNOxJx6jQUm9 lS00abeRr92H9GqTf+56UtNfM8GBlqCEq3sALJY8w4N0N/NxM7UdhgbZchFkRZaaseuD /iGQ== 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 f3-v6si1408109plb.717.2018.02.28.07.53.59; Wed, 28 Feb 2018 07:54:14 -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 S933921AbeB1Pww (ORCPT + 99 others); Wed, 28 Feb 2018 10:52:52 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34416 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932426AbeB1Pwt (ORCPT ); Wed, 28 Feb 2018 10:52:49 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yk-0006Xf-6c; Wed, 28 Feb 2018 15:22:23 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yi-0000DA-Ri; Wed, 28 Feb 2018 15:22:20 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Tony Luck" , "Jia Zhang" , "Thomas Gleixner" , "Borislav Petkov" , "x86-ml" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 179/254] x86/microcode/intel: Extend BDW late-loading with a revision check In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Jia Zhang commit b94b7373317164402ff7728d10f7023127a02b60 upstream. Instead of blacklisting all model 79 CPUs when attempting a late microcode loading, limit that only to CPUs with microcode revisions < 0x0b000021 because only on those late loading may cause a system hang. For such processors either: a) a BIOS update which might contain a newer microcode revision or b) the early microcode loading method should be considered. Processors with revisions 0x0b000021 or higher will not experience such hangs. For more details, see erratum BDF90 in document #334165 (Intel Xeon Processor E7-8800/4800 v4 Product Family Specification Update) from September 2017. [ bp: Heavily massage commit message and pr_* statements. ] Fixes: 723f2828a98c ("x86/microcode/intel: Disable late loading on model 79") Signed-off-by: Jia Zhang Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Acked-by: Tony Luck Cc: x86-ml Link: http://lkml.kernel.org/r/1514772287-92959-1-git-send-email-qianyue.zj@alibaba-inc.com [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- arch/x86/kernel/cpu/microcode/intel.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -271,8 +271,17 @@ static bool is_blacklisted(unsigned int { struct cpuinfo_x86 *c = &cpu_data(cpu); - if (c->x86 == 6 && c->x86_model == 0x4F) { - pr_err_once("late loading on model 79 is disabled.\n"); + /* + * Late loading on model 79 with microcode revision less than 0x0b000021 + * may result in a system hang. This behavior is documented in item + * BDF90, #334165 (Intel Xeon Processor E7-8800/4800 v4 Product Family). + */ + if (c->x86 == 6 && + c->x86_model == 0x4F && + c->x86_mask == 0x01 && + c->microcode < 0x0b000021) { + pr_err_once("Erratum BDF90: late loading with revision < 0x0b000021 (0x%x) disabled.\n", c->microcode); + pr_err_once("Please consider either early loading through initrd/built-in or a potential BIOS update.\n"); return true; }