linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shevchenko, Andriy" <andriy.shevchenko@intel.com>
To: "bp@suse.de" <bp@suse.de>
Cc: "andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mika.westerberg@linux.intel.com"
	<mika.westerberg@linux.intel.com>
Subject: Re: [PATCH] x86/microcode: Disable builtin microcode loading on 32-bit for now
Date: Thu, 4 Jun 2015 09:47:00 +0000	[thread overview]
Message-ID: <1433411220.26331.61.camel@intel.com> (raw)
In-Reply-To: <20150604092133.GB4532@pd.tnic>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3817 bytes --]

On Thu, 2015-06-04 at 11:21 +0200, Borislav Petkov wrote:
> Ok, here's an actual patch. I'm very sorry for the confusion and big
> thanks guys for catching it on time, before it hits the merge window!
> 
> Much appreciated. :-D

Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks!

> ---
> From: Borislav Petkov <bp@suse.de>
> Date: Thu, 4 Jun 2015 09:52:37 +0200
> Subject: [PATCH] x86/microcode: Disable builtin microcode loading on 32-bit for now
> 
> Andy Shevchenko reported machine freezes when booting latest tip on
> x32 setups. Problem is, the builtin microcode handling cannot really
> work that early, when we haven't even enabled paging. A proper fix
> would involve handling that case specially as every other early 32-bit
> boot case in the microcode loader and would require much more involved
> changes for which it is too late now, more than a week before the
> upcoming merge window.
> 
> So, disable the builtin microcode loading only on 32-bit for now.
> 
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: <x86@kernel.org>
> Link: http://lkml.kernel.org/r/1433257003-159485-1-git-send-email-andriy.shevchenko@linux.intel.com
> Signed-off-by: 
> ---
>  arch/x86/kernel/cpu/microcode/amd_early.c   | 4 ++++
>  arch/x86/kernel/cpu/microcode/intel_early.c | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/arch/x86/kernel/cpu/microcode/amd_early.c b/arch/x86/kernel/cpu/microcode/amd_early.c
> index 9208a36d0f03..9243cd839829 100644
> --- a/arch/x86/kernel/cpu/microcode/amd_early.c
> +++ b/arch/x86/kernel/cpu/microcode/amd_early.c
> @@ -230,6 +230,7 @@ static void apply_ucode_in_initrd(void *ucode, size_t size, bool save_patch)
>  
>  static bool __init load_builtin_amd_microcode(struct cpio_data *cp, int family)
>  {
> +#ifdef CONFIG_X86_64
>  	char fw_name[36] = "amd-ucode/microcode_amd.bin";
>  
>  	if (family >= 0x15)
> @@ -237,6 +238,9 @@ static bool __init load_builtin_amd_microcode(struct cpio_data *cp, int family)
>  			 "amd-ucode/microcode_amd_fam%.2xh.bin", family);
>  
>  	return get_builtin_firmware(cp, fw_name);
> +#else
> +	return false;
> +#endif
>  }
>  
>  void __init load_ucode_amd_bsp(int family)
> diff --git a/arch/x86/kernel/cpu/microcode/intel_early.c b/arch/x86/kernel/cpu/microcode/intel_early.c
> index 10dff3f3f686..b4858d892592 100644
> --- a/arch/x86/kernel/cpu/microcode/intel_early.c
> +++ b/arch/x86/kernel/cpu/microcode/intel_early.c
> @@ -523,6 +523,7 @@ EXPORT_SYMBOL_GPL(save_mc_for_early);
>  
>  static bool __init load_builtin_intel_microcode(struct cpio_data *cp)
>  {
> +#ifdef CONFIG_X86_64
>  	u32 eax = 0x00000001, ebx, ecx = 0, edx;
>  	int family, model, stepping;
>  	char name[30];
> @@ -536,6 +537,9 @@ static bool __init load_builtin_intel_microcode(struct cpio_data *cp)
>  	sprintf(name, "intel-ucode/%02x-%02x-%02x", family, model, stepping);
>  
>  	return get_builtin_firmware(cp, name);
> +#else
> +	return false;
> +#endif
>  }
>  
>  static __initdata char ucode_name[] = "kernel/x86/microcode/GenuineIntel.bin";
> -- 
> 2.3.5
> 
> 


-- 
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2015-06-04  9:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 14:56 [PATCH 1/1] x86/microcode: vsnprintf() might be unavailable Andy Shevchenko
2015-06-02 16:24 ` Borislav Petkov
2015-06-02 16:49   ` Andy Shevchenko
2015-06-02 17:00     ` Borislav Petkov
2015-06-02 17:31       ` Andy Shevchenko
2015-06-03 10:56         ` Borislav Petkov
2015-06-03 15:27           ` Andy Shevchenko
2015-06-03 17:49             ` Shevchenko, Andriy
2015-06-03 21:13               ` Borislav Petkov
2015-06-04  9:21                 ` [PATCH] x86/microcode: Disable builtin microcode loading on 32-bit for now Borislav Petkov
2015-06-04  9:47                   ` Shevchenko, Andriy [this message]
2015-06-02 16:46 ` [PATCH 1/1] x86/microcode: vsnprintf() might be unavailable Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433411220.26331.61.camel@intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).