linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/11] x86/microcode: Early load microcode
@ 2012-11-30  1:47 Fenghua Yu
  2012-11-30  1:47 ` [PATCH v2 01/10] Documentation/x86: " Fenghua Yu
                   ` (9 more replies)
  0 siblings, 10 replies; 126+ messages in thread
From: Fenghua Yu @ 2012-11-30  1:47 UTC (permalink / raw)
  To: H Peter Anvin, Ingo Molnar, Thomas Gleixner, Asit K Mallick,
	Tigran Aivazian, Andreas Herrmann, Borislav Petkov, linux-kernel,
	x86
  Cc: Fenghua Yu

From: Fenghua Yu <fenghua.yu@intel.com>

The problem in current microcode loading method is that we load a microcode way,
way too late; ideally we should load it before turning paging on.  This may only
be practical on 32 bits since we can't get to 64-bit mode without paging on,
but we should still do it as early as at all possible.

Similarly, we should load the microcode update as early as possible during AP
bringup and when processors are brought back online after hotplug or S3/S4.

In order to do that, the microcode patch needs to be permanently present in
kernel memory.  Each individual patch is fairly small, so that is OK, but the
entire blob with support for each CPU is too big. Since only CPU's with same
model can be in the same platform, we store microcode with the same model as
BSP. Later on AP's can upload microcode from the saved microcodep patches.

Note, however, that Linux users have gotten used to being able to install a
microcode patch in the field without having a reboot; we support that model too.

v2: Detect vendor before loading microcode. Move some functions from
microcode_intel_early.c to microcode_intel_lib.c. Change some early loading
microcode dependencies in Kconfig. Reword doc.

Fenghua Yu (10):
  Documentation/x86: Early load microcode
  x86/microcode_intel.h: Define functions and macros for early load
    ucode
  x86/microcode_core_early.c: Define interfaces for early load ucode
  x86/microcode_intel_lib.c: Early update ucode on Intel's CPU
  x86/microcode_intel_early.c: Early update ucode on Intel's CPU
  x86/head_32.S: Early update ucode in 32-bit
  x86/head64.c: Early update ucode in 64-bit
  x86/smpboot.c: Early update ucode on AP
  x86/mm/init.c: Copy ucode from initrd image to memory
  x86/Kconfig: Configurations to enable/disable the feature

 Documentation/x86/early-microcode.txt   |   43 +++
 arch/x86/Kconfig                        |   18 ++
 arch/x86/include/asm/microcode.h        |   23 ++
 arch/x86/include/asm/microcode_intel.h  |  106 ++++++++
 arch/x86/kernel/Makefile                |    3 +
 arch/x86/kernel/head64.c                |    6 +
 arch/x86/kernel/head_32.S               |    6 +
 arch/x86/kernel/microcode_core.c        |    7 +-
 arch/x86/kernel/microcode_core_early.c  |   70 +++++
 arch/x86/kernel/microcode_intel.c       |  185 +-------------
 arch/x86/kernel/microcode_intel_early.c |  438 +++++++++++++++++++++++++++++++
 arch/x86/kernel/microcode_intel_lib.c   |  174 ++++++++++++
 arch/x86/kernel/smpboot.c               |    7 +
 arch/x86/mm/init.c                      |   10 +
 14 files changed, 915 insertions(+), 181 deletions(-)
 create mode 100644 Documentation/x86/early-microcode.txt
 create mode 100644 arch/x86/include/asm/microcode_intel.h
 create mode 100644 arch/x86/kernel/microcode_core_early.c
 create mode 100644 arch/x86/kernel/microcode_intel_early.c
 create mode 100644 arch/x86/kernel/microcode_intel_lib.c

-- 
1.7.2


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

end of thread, other threads:[~2012-12-20  4:21 UTC | newest]

Thread overview: 126+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-30  1:47 [PATCH v2 00/11] x86/microcode: Early load microcode Fenghua Yu
2012-11-30  1:47 ` [PATCH v2 01/10] Documentation/x86: " Fenghua Yu
2012-11-30 19:46   ` H. Peter Anvin
2012-11-30 20:40     ` Yu, Fenghua
2012-11-30  1:47 ` [PATCH v2 02/10] x86/microcode_intel.h: Define functions and macros for early loading ucode Fenghua Yu
2012-12-01  0:21   ` [tip:x86/microcode] " tip-bot for Fenghua Yu
2012-11-30  1:47 ` [PATCH v2 03/10] x86/microcode_core_early.c: Define interfaces " Fenghua Yu
2012-12-01  0:23   ` [tip:x86/microcode] " tip-bot for Fenghua Yu
2012-11-30  1:47 ` [PATCH v2 04/10] x86/microcode_intel_lib.c: Early update ucode on Intel's CPU Fenghua Yu
2012-12-01  0:24   ` [tip:x86/microcode] " tip-bot for Fenghua Yu
2012-11-30  1:47 ` [PATCH v2 05/10] x86/microcode_intel_early.c: " Fenghua Yu
2012-12-01  0:25   ` [tip:x86/microcode] " tip-bot for Fenghua Yu
2012-12-01  0:55     ` Yinghai Lu
2012-12-04  0:18       ` Yu, Fenghua
2012-12-11  2:39         ` Yinghai Lu
2012-12-11  3:41           ` H. Peter Anvin
2012-12-11  3:55             ` Yinghai Lu
2012-12-11  6:34               ` H. Peter Anvin
2012-12-11  7:07                 ` Yinghai Lu
2012-12-11 14:57                   ` Borislav Petkov
2012-12-11 16:46                     ` Yinghai Lu
2012-12-11 16:48                       ` H. Peter Anvin
2012-12-11 17:00                         ` Yinghai Lu
2012-12-11 17:06                           ` Borislav Petkov
2012-12-11 17:15                             ` Yinghai Lu
2012-12-11 17:26                               ` Yu, Fenghua
2012-12-11 17:38                               ` H. Peter Anvin
2012-12-11 23:53                                 ` Yinghai Lu
2012-12-11 23:57                                   ` H. Peter Anvin
2012-12-12  0:27                                     ` Yinghai Lu
2012-12-12  0:37                                       ` H. Peter Anvin
2012-12-12  7:14                                         ` Yinghai Lu
2012-12-12 10:26                                           ` Yinghai Lu
2012-12-13  1:06                                           ` Yinghai Lu
2012-12-12  6:57                                       ` H. Peter Anvin
2012-12-12 13:38                                         ` Borislav Petkov
2012-12-12 17:43                                           ` H. Peter Anvin
2012-12-13  5:12                                           ` H. Peter Anvin
2012-12-13  5:26                                             ` H. Peter Anvin
2012-12-13  7:01                                               ` Yinghai Lu
2012-12-13 15:01                                                 ` H. Peter Anvin
2012-12-13 19:13                                               ` Borislav Petkov
2012-12-13 21:36                                                 ` H. Peter Anvin
2012-12-14  9:11                                                   ` Yinghai Lu
2012-12-14 18:16                                                     ` H. Peter Anvin
2012-12-14 19:46                                                     ` H. Peter Anvin
2012-12-14 20:04                                                       ` Yinghai Lu
2012-12-14 20:08                                                         ` Yinghai Lu
2012-12-14 20:14                                                           ` Yinghai Lu
2012-12-14 20:44                                                             ` H. Peter Anvin
2012-12-15  7:57                                                           ` Yinghai Lu
2012-12-15 19:30                                                             ` H. Peter Anvin
2012-12-15 20:55                                                               ` Yinghai Lu
2012-12-15 21:31                                                                 ` H. Peter Anvin
2012-12-15 21:40                                                                 ` H. Peter Anvin
2012-12-15 22:13                                                                   ` Yinghai Lu
2012-12-15 22:17                                                                     ` H. Peter Anvin
2012-12-15 23:15                                                                       ` Yinghai Lu
2012-12-15 23:17                                                                         ` H. Peter Anvin
2012-12-19 20:37                                                                           ` Borislav Petkov
2012-12-19 21:07                                                                             ` Jacob Shin
2012-12-19 21:48                                                                               ` H. Peter Anvin
2012-12-19 22:05                                                                                 ` Jacob Shin
2012-12-19 22:25                                                                                   ` H. Peter Anvin
2012-12-19 22:47                                                                                     ` Yinghai Lu
2012-12-19 22:59                                                                                       ` H. Peter Anvin
2012-12-19 22:51                                                                                     ` Borislav Petkov
2012-12-19 22:59                                                                                       ` Jacob Shin
2012-12-19 23:03                                                                                         ` Borislav Petkov
2012-12-19 23:21                                                                                           ` Jacob Shin
2012-12-19 23:56                                                                                             ` H. Peter Anvin
2012-12-19 23:22                                                                                           ` H. Peter Anvin
2012-12-19 23:40                                                                                             ` Borislav Petkov
2012-12-20  0:02                                                                                               ` H. Peter Anvin
2012-12-20  0:10                                                                                                 ` Borislav Petkov
2012-12-20  0:15                                                                                                   ` H. Peter Anvin
2012-12-19 23:40                                                                                             ` Yinghai Lu
2012-12-19 23:43                                                                                               ` H. Peter Anvin
2012-12-19 23:48                                                                                                 ` Yinghai Lu
2012-12-19 23:40                                                                                             ` Jacob Shin
2012-12-19 23:45                                                                                               ` Yinghai Lu
2012-12-19 23:50                                                                                               ` H. Peter Anvin
2012-12-19 23:55                                                                                                 ` Borislav Petkov
2012-12-19 23:57                                                                                                   ` H. Peter Anvin
2012-12-20  0:07                                                                                                 ` Jacob Shin
2012-12-20  0:24                                                                                                   ` H. Peter Anvin
2012-12-20  0:29                                                                                                     ` Jacob Shin
2012-12-20  0:41                                                                                                       ` H. Peter Anvin
2012-12-20  2:37                                                                                                       ` H. Peter Anvin
2012-12-20  4:16                                                                                                         ` Jacob Shin
2012-12-20  4:21                                                                                                           ` H. Peter Anvin
2012-12-19 22:55                                                                                     ` Jacob Shin
2012-12-19 23:00                                                                                       ` Borislav Petkov
2012-12-19 23:17                                                                                         ` H. Peter Anvin
2012-12-19 23:30                                                                                           ` Borislav Petkov
2012-12-19 23:37                                                                                             ` H. Peter Anvin
2012-12-19 23:23                                                                                       ` H. Peter Anvin
2012-12-16  2:09                                                                   ` Yinghai Lu
2012-12-16  5:17                                                                     ` Yinghai Lu
2012-12-16  8:50                                                                       ` Yinghai Lu
2012-12-17 22:47                                                                         ` Yinghai Lu
2012-12-17 23:11                                                                           ` H. Peter Anvin
2012-12-17 23:26                                                                             ` Yinghai Lu
2012-12-18  1:11                                                                               ` Yinghai Lu
2012-12-18  1:51                                                                                 ` Yinghai Lu
2012-12-18  2:42                                                                                   ` Yinghai Lu
2012-12-14 20:10                                                         ` H. Peter Anvin
2012-12-14 20:17                                                           ` Yinghai Lu
2012-12-14 20:52                                                             ` H. Peter Anvin
2012-12-14 21:07                                                         ` Yinghai Lu
2012-12-11 18:02                               ` H. Peter Anvin
2012-12-11 18:20                                 ` H. Peter Anvin
2012-12-11 18:42                                   ` Yinghai Lu
2012-12-11 18:46                                     ` H. Peter Anvin
2012-12-11 19:18                                       ` Yinghai Lu
2012-12-11 19:33                                         ` H. Peter Anvin
2012-11-30  1:47 ` [PATCH v2 06/10] x86/head_32.S: Early update ucode in 32-bit Fenghua Yu
2012-12-01  0:26   ` [tip:x86/microcode] " tip-bot for Fenghua Yu
2012-11-30  1:47 ` [PATCH v2 07/10] x86/head64.c: Early update ucode in 64-bit Fenghua Yu
2012-12-01  0:27   ` [tip:x86/microcode] " tip-bot for Fenghua Yu
2012-11-30  1:47 ` [PATCH v2 08/10] x86/smpboot.c: Early update ucode on AP Fenghua Yu
2012-12-01  0:28   ` [tip:x86/microcode] " tip-bot for Fenghua Yu
2012-11-30  1:47 ` [PATCH v2 09/10] x86/mm/init.c: Copy ucode from initrd image to memory Fenghua Yu
2012-12-01  0:29   ` [tip:x86/microcode] " tip-bot for Fenghua Yu
2012-11-30  1:47 ` [PATCH v2 10/10] x86/Kconfig: Configurations to enable/disable the feature Fenghua Yu
2012-12-01  0:30   ` [tip:x86/microcode] x86/Kconfig: Configurations to enable/ disable " tip-bot for Fenghua Yu

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).