Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526284

Re: [PATCH] x86/boot: Fail the boot if !M486 and CPUID is missing

From Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/boot: Fail the boot if !M486 and CPUID is missing
Date 2016-11-20 20:40 +0100
Message-ID <sFG81-7Hn-5@gated-at.bofh.it> (permalink)
References <sFnoJ-35g-25@gated-at.bofh.it> <sFyka-1Ph-11@gated-at.bofh.it> <sFDa9-5UI-23@gated-at.bofh.it> <sFEfT-6wr-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 20 Nov 2016, Borislav Petkov wrote:
> We will have set (or not) the X86_FEATURE_CPUID bit at
> early_identify_cpu() time. Looking at the code, we do call sync_core()
> pretty early. :-\

Hmm, watch out for the early microcode update driver for Intel
processors should something get changed in the implementation, or in the
behavior of sync_core().

That driver absolutely needs to issue a cpuid (with EAX = 1) before each
rdmsr(MSR_IA32_UCODE_REV).  And it uses sync_core() calls to do it.  A
CR2 access just won't do in this extremely specific case.

This kind of pitfall is why I wanted to replace all use of sync_core()
in arch/x86/kernel/cpu/microcode/intel.c with an explicit use of an
inconditional cpuid(eax = 1)...

(note: this protocol to read MSR_IA32_UCODE_REV was made an
architectural requirement a while ago -- it was once considered an
erratum workaround.  It is documented in the "Intel 64 and IA‐32
Architectures Software Developer's Manual", Volume 3A: System
Programming Guide, Part 1, section 9.11).

-- 
  Henrique Holschuh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/boot: Fail the boot if !M486 and CPUID is missing Andy Lutomirski <luto@kernel.org> - 2016-11-20 00:40 +0100
  Re: [PATCH] x86/boot: Fail the boot if !M486 and CPUID is missing Borislav Petkov <bp@alien8.de> - 2016-11-20 12:20 +0100
    Re: [PATCH] x86/boot: Fail the boot if !M486 and CPUID is missing Andy Lutomirski <luto@amacapital.net> - 2016-11-20 17:30 +0100
      Re: [PATCH] x86/boot: Fail the boot if !M486 and CPUID is missing Borislav Petkov <bp@alien8.de> - 2016-11-20 18:40 +0100
        Re: [PATCH] x86/boot: Fail the boot if !M486 and CPUID is missing Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-11-20 20:40 +0100
          Re: [PATCH] x86/boot: Fail the boot if !M486 and CPUID is missing Borislav Petkov <bp@alien8.de> - 2016-11-20 21:50 +0100
  [tip:x86/urgent] x86/boot: Fail the boot if !M486 and CPUID is  missing tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2016-11-21 09:50 +0100

csiph-web