linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading
@ 2018-01-01  2:04 Jia Zhang
  2018-01-01 22:10 ` Borislav Petkov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jia Zhang @ 2018-01-01  2:04 UTC (permalink / raw)
  To: bp, mingo; +Cc: hpa, tglx, tony.luck, x86, linux-kernel, Jia Zhang

Instead of blacklisting all types of Broadwell processor when running
a late loading, only BDW-EP (signature 0x406f1, aka family 6, model 79,
stepping 1) with the microcode version less than 0x0b000021 needs to
be blacklisted.

The erratum is documented in the the public documentation #334165 (See
the item BDF90 for details).

Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>
---
 arch/x86/kernel/cpu/microcode/intel.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 99af05f..42896bb 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -910,9 +910,17 @@ static bool is_blacklisted(unsigned int cpu)
 {
 	struct cpuinfo_x86 *c = &cpu_data(cpu);
 
-	if (c->x86 == 6 && c->x86_model == INTEL_FAM6_BROADWELL_X) {
-		pr_err_once("late loading on model 79 is disabled.\n");
-		return true;
+	/*
+	 * The Broadwell-EP processor with the microcode version less
+	 * then 0x0b000021 may result in system hang when running a late
+	 * loading. This behavior is documented in item BDF90, #334165
+	 * (Intel Xeon Processor E7-8800/4800 v4 Product Family).
+	 */
+	if (c->x86 == 6 && c->x86_model == INTEL_FAM6_BROADWELL_X &&
+	    c->x86_stepping == 0x01 && c->microcode < 0x0b000021) {
+		pr_err_once("Not loading old microcode version: erratum BDF90 on Intel Broadwell-EP stepping 1 CPUs may cause system hangs.\n");
+		pr_err_once("Please update your microcode version through BIOS update or early loading from the initrd.\n");
+	return true;
 	}
 
 	return false;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading
  2018-01-01  2:04 [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading Jia Zhang
@ 2018-01-01 22:10 ` Borislav Petkov
  2018-01-02  1:19   ` Jia Zhang
  2018-01-02 19:24   ` Luck, Tony
  2018-01-02 20:49 ` kbuild test robot
  2018-01-06 13:48 ` [tip:x86/urgent] x86/microcode/intel: Extend BDW late-loading with a revision check tip-bot for Jia Zhang
  2 siblings, 2 replies; 9+ messages in thread
From: Borislav Petkov @ 2018-01-01 22:10 UTC (permalink / raw)
  To: Jia Zhang; +Cc: mingo, hpa, tglx, tony.luck, x86, linux-kernel

On Mon, Jan 01, 2018 at 10:04:47AM +0800, Jia Zhang wrote:
> Instead of blacklisting all types of Broadwell processor when running
> a late loading, only BDW-EP (signature 0x406f1, aka family 6, model 79,
> stepping 1) with the microcode version less than 0x0b000021 needs to
> be blacklisted.
> 
> The erratum is documented in the the public documentation #334165 (See
> the item BDF90 for details).
> 
> Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>
> ---
>  arch/x86/kernel/cpu/microcode/intel.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)

Ok, I went and massaged your version, here's what I committed:

---
From: Jia Zhang <qianyue.zj@alibaba-inc.com>
Date: Mon, 1 Jan 2018 10:04:47 +0800
Subject: [PATCH] x86/microcode/intel: Extend BDW late-loading with a revision
 check

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.

Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Cc: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/1514772287-92959-1-git-send-email-qianyue.zj@alibaba-inc.com
[ Heavily massage commit message and pr_* statements. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/kernel/cpu/microcode/intel.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 8ccdca6d3f9e..d9e460fc7a3b 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -910,8 +910,17 @@ static bool is_blacklisted(unsigned int cpu)
 {
 	struct cpuinfo_x86 *c = &cpu_data(cpu);
 
-	if (c->x86 == 6 && c->x86_model == INTEL_FAM6_BROADWELL_X) {
-		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 == INTEL_FAM6_BROADWELL_X &&
+	    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;
 	}
 
-- 
2.13.0

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading
  2018-01-01 22:10 ` Borislav Petkov
@ 2018-01-02  1:19   ` Jia Zhang
  2018-01-02 19:24   ` Luck, Tony
  1 sibling, 0 replies; 9+ messages in thread
From: Jia Zhang @ 2018-01-02  1:19 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: mingo, hpa, tglx, tony.luck, x86, linux-kernel

Thanks for your comments. Happy new year!

Jia

在 2018/1/2 上午6:10, Borislav Petkov 写道:
> On Mon, Jan 01, 2018 at 10:04:47AM +0800, Jia Zhang wrote:
>> Instead of blacklisting all types of Broadwell processor when running
>> a late loading, only BDW-EP (signature 0x406f1, aka family 6, model 79,
>> stepping 1) with the microcode version less than 0x0b000021 needs to
>> be blacklisted.
>>
>> The erratum is documented in the the public documentation #334165 (See
>> the item BDF90 for details).
>>
>> Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>
>> ---
>>  arch/x86/kernel/cpu/microcode/intel.c | 14 +++++++++++---
>>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> Ok, I went and massaged your version, here's what I committed:
> 
> ---
> From: Jia Zhang <qianyue.zj@alibaba-inc.com>
> Date: Mon, 1 Jan 2018 10:04:47 +0800
> Subject: [PATCH] x86/microcode/intel: Extend BDW late-loading with a revision
>  check
> 
> 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.
> 
> Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>
> Acked-by: Tony Luck <tony.luck@intel.com>
> Cc: x86-ml <x86@kernel.org>
> Link: http://lkml.kernel.org/r/1514772287-92959-1-git-send-email-qianyue.zj@alibaba-inc.com
> [ Heavily massage commit message and pr_* statements. ]
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
>  arch/x86/kernel/cpu/microcode/intel.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
> index 8ccdca6d3f9e..d9e460fc7a3b 100644
> --- a/arch/x86/kernel/cpu/microcode/intel.c
> +++ b/arch/x86/kernel/cpu/microcode/intel.c
> @@ -910,8 +910,17 @@ static bool is_blacklisted(unsigned int cpu)
>  {
>  	struct cpuinfo_x86 *c = &cpu_data(cpu);
>  
> -	if (c->x86 == 6 && c->x86_model == INTEL_FAM6_BROADWELL_X) {
> -		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 == INTEL_FAM6_BROADWELL_X &&
> +	    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;
>  	}
>  
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading
  2018-01-01 22:10 ` Borislav Petkov
  2018-01-02  1:19   ` Jia Zhang
@ 2018-01-02 19:24   ` Luck, Tony
  2018-01-03 13:03     ` Borislav Petkov
  1 sibling, 1 reply; 9+ messages in thread
From: Luck, Tony @ 2018-01-02 19:24 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: Jia Zhang, mingo, hpa, tglx, x86, linux-kernel

On Mon, Jan 01, 2018 at 11:10:56PM +0100, Borislav Petkov wrote:
> On Mon, Jan 01, 2018 at 10:04:47AM +0800, Jia Zhang wrote:
> 
> Ok, I went and massaged your version, here's what I committed:
> 
> Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>
> Acked-by: Tony Luck <tony.luck@intel.com>
> Cc: x86-ml <x86@kernel.org>
> Link: http://lkml.kernel.org/r/1514772287-92959-1-git-send-email-qianyue.zj@alibaba-inc.com
> [ Heavily massage commit message and pr_* statements. ]
> Signed-off-by: Borislav Petkov <bp@suse.de>

Should there be a "Cc: stable ..." in there?

The original patch that disables for all broadwell
seems to be geting applied to a bunch of older trees,
I think we want this one to chase after it.

Perhaps a

Fixes: 723f2828a98c ("x86/microcode/intel: Disable late loading on model 79")

too?

-Tony

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading
  2018-01-01  2:04 [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading Jia Zhang
  2018-01-01 22:10 ` Borislav Petkov
@ 2018-01-02 20:49 ` kbuild test robot
  2018-01-02 20:57   ` Borislav Petkov
  2018-01-06 13:48 ` [tip:x86/urgent] x86/microcode/intel: Extend BDW late-loading with a revision check tip-bot for Jia Zhang
  2 siblings, 1 reply; 9+ messages in thread
From: kbuild test robot @ 2018-01-02 20:49 UTC (permalink / raw)
  To: Jia Zhang
  Cc: kbuild-all, bp, mingo, hpa, tglx, tony.luck, x86, linux-kernel,
	Jia Zhang

[-- Attachment #1: Type: text/plain, Size: 2020 bytes --]

Hi Jia,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.15-rc5]
[also build test ERROR on next-20180102]
[cannot apply to tip/x86/core]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jia-Zhang/x86-microcode-intel-Blacklist-the-specific-BDW-EP-for-late-loading/20180103-040752
config: i386-randconfig-x010-201800 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   arch/x86/kernel/cpu/microcode/intel.c: In function 'is_blacklisted':
>> arch/x86/kernel/cpu/microcode/intel.c:920:7: error: 'struct cpuinfo_x86' has no member named 'x86_stepping'
         c->x86_stepping == 0x01 && c->microcode < 0x0b000021) {
          ^~

vim +920 arch/x86/kernel/cpu/microcode/intel.c

   908	
   909	static bool is_blacklisted(unsigned int cpu)
   910	{
   911		struct cpuinfo_x86 *c = &cpu_data(cpu);
   912	
   913		/*
   914		 * The Broadwell-EP processor with the microcode version less
   915		 * then 0x0b000021 may result in system hang when running a late
   916		 * loading. This behavior is documented in item BDF90, #334165
   917		 * (Intel Xeon Processor E7-8800/4800 v4 Product Family).
   918		 */
   919		if (c->x86 == 6 && c->x86_model == INTEL_FAM6_BROADWELL_X &&
 > 920		    c->x86_stepping == 0x01 && c->microcode < 0x0b000021) {
   921			pr_err_once("Not loading old microcode version: erratum BDF90 on Intel Broadwell-EP stepping 1 CPUs may cause system hangs.\n");
   922			pr_err_once("Please update your microcode version through BIOS update or early loading from the initrd.\n");
   923		return true;
   924		}
   925	
   926		return false;
   927	}
   928	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34256 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading
  2018-01-02 20:49 ` kbuild test robot
@ 2018-01-02 20:57   ` Borislav Petkov
  2018-01-03 12:24     ` Jia Zhang
  0 siblings, 1 reply; 9+ messages in thread
From: Borislav Petkov @ 2018-01-02 20:57 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Jia Zhang, kbuild-all, mingo, hpa, tglx, tony.luck, x86, linux-kernel

On Wed, Jan 03, 2018 at 04:49:42AM +0800, kbuild test robot wrote:
> Hi Jia,
> 
> Thank you for the patch! Yet something to improve:
> 
> [auto build test ERROR on v4.15-rc5]
> [also build test ERROR on next-20180102]
> [cannot apply to tip/x86/core]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Jia-Zhang/x86-microcode-intel-Blacklist-the-specific-BDW-EP-for-late-loading/20180103-040752
> config: i386-randconfig-x010-201800 (attached as .config)
> compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> All errors (new ones prefixed by >>):
> 
>    arch/x86/kernel/cpu/microcode/intel.c: In function 'is_blacklisted':
> >> arch/x86/kernel/cpu/microcode/intel.c:920:7: error: 'struct cpuinfo_x86' has no member named 'x86_stepping'
>          c->x86_stepping == 0x01 && c->microcode < 0x0b000021) {
>           ^~

Yeah, already fixed that:

https://lkml.kernel.org/r/20180101221056.eav4buwnpqhudei6@pd.tnic

Thx!

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading
  2018-01-02 20:57   ` Borislav Petkov
@ 2018-01-03 12:24     ` Jia Zhang
  0 siblings, 0 replies; 9+ messages in thread
From: Jia Zhang @ 2018-01-03 12:24 UTC (permalink / raw)
  To: Borislav Petkov, kbuild test robot
  Cc: kbuild-all, mingo, hpa, tglx, tony.luck, x86, linux-kernel



在 2018/1/3 上午4:57, Borislav Petkov 写道:
> On Wed, Jan 03, 2018 at 04:49:42AM +0800, kbuild test robot wrote:
>> Hi Jia,
>>
>> Thank you for the patch! Yet something to improve:
>>
>> [auto build test ERROR on v4.15-rc5]
>> [also build test ERROR on next-20180102]
>> [cannot apply to tip/x86/core]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>>
>> url:    https://github.com/0day-ci/linux/commits/Jia-Zhang/x86-microcode-intel-Blacklist-the-specific-BDW-EP-for-late-loading/20180103-040752
>> config: i386-randconfig-x010-201800 (attached as .config)
>> compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
>> reproduce:
>>         # save the attached .config to linux build tree
>>         make ARCH=i386 
>>
>> All errors (new ones prefixed by >>):
>>
>>    arch/x86/kernel/cpu/microcode/intel.c: In function 'is_blacklisted':
>>>> arch/x86/kernel/cpu/microcode/intel.c:920:7: error: 'struct cpuinfo_x86' has no member named 'x86_stepping'
>>          c->x86_stepping == 0x01 && c->microcode < 0x0b000021) {
>>           ^~
> 
> Yeah, already fixed that:
> 
> https://lkml.kernel.org/r/20180101221056.eav4buwnpqhudei6@pd.tnic

So what is the best moment to resend a V3 patch for "x86: clean up
confusing x86_mask" to correct x86_mask for this?

Thanks,
Jia

> 
> Thx!
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading
  2018-01-02 19:24   ` Luck, Tony
@ 2018-01-03 13:03     ` Borislav Petkov
  0 siblings, 0 replies; 9+ messages in thread
From: Borislav Petkov @ 2018-01-03 13:03 UTC (permalink / raw)
  To: Luck, Tony; +Cc: Jia Zhang, mingo, hpa, tglx, x86, linux-kernel

On Tue, Jan 02, 2018 at 11:24:18AM -0800, Luck, Tony wrote:
> Should there be a "Cc: stable ..." in there?
> 
> The original patch that disables for all broadwell
> seems to be geting applied to a bunch of older trees,
> I think we want this one to chase after it.
> 
> Perhaps a
> 
> Fixes: 723f2828a98c ("x86/microcode/intel: Disable late loading on model 79")
> 
> too?

Done and done.

Thx!

---
From: Jia Zhang <qianyue.zj@alibaba-inc.com>
Date: Mon, 1 Jan 2018 10:04:47 +0800
Subject: [PATCH] x86/microcode/intel: Extend BDW late-loading with a revision
 check

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.

Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Cc: x86-ml <x86@kernel.org>
Cc: <stable@vger.kernel.org> # v4.14
Fixes: 723f2828a98c ("x86/microcode/intel: Disable late loading on model 79")
Link: http://lkml.kernel.org/r/1514772287-92959-1-git-send-email-qianyue.zj@alibaba-inc.com
[ Heavily massage commit message and pr_* statements. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/kernel/cpu/microcode/intel.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 8ccdca6d3f9e..d9e460fc7a3b 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -910,8 +910,17 @@ static bool is_blacklisted(unsigned int cpu)
 {
 	struct cpuinfo_x86 *c = &cpu_data(cpu);
 
-	if (c->x86 == 6 && c->x86_model == INTEL_FAM6_BROADWELL_X) {
-		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 == INTEL_FAM6_BROADWELL_X &&
+	    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;
 	}
 
-- 
2.13.0

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [tip:x86/urgent] x86/microcode/intel: Extend BDW late-loading with a revision check
  2018-01-01  2:04 [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading Jia Zhang
  2018-01-01 22:10 ` Borislav Petkov
  2018-01-02 20:49 ` kbuild test robot
@ 2018-01-06 13:48 ` tip-bot for Jia Zhang
  2 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Jia Zhang @ 2018-01-06 13:48 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: qianyue.zj, hpa, tglx, linux-kernel, tony.luck, x86, mingo, bp

Commit-ID:  b94b7373317164402ff7728d10f7023127a02b60
Gitweb:     https://git.kernel.org/tip/b94b7373317164402ff7728d10f7023127a02b60
Author:     Jia Zhang <qianyue.zj@alibaba-inc.com>
AuthorDate: Mon, 1 Jan 2018 10:04:47 +0800
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 6 Jan 2018 14:44:57 +0100

x86/microcode/intel: Extend BDW late-loading with a revision check

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 <qianyue.zj@alibaba-inc.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Tony Luck <tony.luck@intel.com>
Cc: x86-ml <x86@kernel.org>
Cc: <stable@vger.kernel.org> # v4.14
Link: http://lkml.kernel.org/r/1514772287-92959-1-git-send-email-qianyue.zj@alibaba-inc.com
---
 arch/x86/kernel/cpu/microcode/intel.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 8ccdca6..d9e460f 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -910,8 +910,17 @@ static bool is_blacklisted(unsigned int cpu)
 {
 	struct cpuinfo_x86 *c = &cpu_data(cpu);
 
-	if (c->x86 == 6 && c->x86_model == INTEL_FAM6_BROADWELL_X) {
-		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 == INTEL_FAM6_BROADWELL_X &&
+	    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;
 	}
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-06 13:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-01  2:04 [PATCH v5] x86/microcode/intel: Blacklist the specific BDW-EP for late loading Jia Zhang
2018-01-01 22:10 ` Borislav Petkov
2018-01-02  1:19   ` Jia Zhang
2018-01-02 19:24   ` Luck, Tony
2018-01-03 13:03     ` Borislav Petkov
2018-01-02 20:49 ` kbuild test robot
2018-01-02 20:57   ` Borislav Petkov
2018-01-03 12:24     ` Jia Zhang
2018-01-06 13:48 ` [tip:x86/urgent] x86/microcode/intel: Extend BDW late-loading with a revision check tip-bot for Jia Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).