Commit 24b888d8 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "A few updates for x86:

   - Fix an unintended sign extension issue in the fault handling code

   - Rename the new resource control config switch so it's less
     confusing

   - Avoid setting up EFI info in kexec when the EFI runtime is
     disabled.

   - Fix the microcode version check in the AMD microcode loader so it
     only loads higher version numbers and never downgrades

   - Set EFER.LME in the 32bit trampoline before returning to long mode
     to handle older AMD/KVM behaviour properly.

   - Add Darren and Andy as x86/platform reviewers"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/resctrl: Avoid confusion over the new X86_RESCTRL config
  x86/kexec: Don't setup EFI info if EFI runtime is not enabled
  x86/microcode/amd: Don't falsely trick the late loading mechanism
  MAINTAINERS: Add Andy and Darren as arch/x86/platform/ reviewers
  x86/fault: Fix sign-extend unintended sign extension
  x86/boot/compressed/64: Set EFER.LME=1 in 32-bit trampoline before returning to long mode
  x86/cpu: Add Atom Tremont (Jacobsville)
parents cc6810e3 e6d42931
...@@ -9,7 +9,7 @@ Fenghua Yu <fenghua.yu@intel.com> ...@@ -9,7 +9,7 @@ Fenghua Yu <fenghua.yu@intel.com>
Tony Luck <tony.luck@intel.com> Tony Luck <tony.luck@intel.com>
Vikas Shivappa <vikas.shivappa@intel.com> Vikas Shivappa <vikas.shivappa@intel.com>
This feature is enabled by the CONFIG_X86_RESCTRL and the x86 /proc/cpuinfo This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86 /proc/cpuinfo
flag bits: flag bits:
RDT (Resource Director Technology) Allocation - "rdt_a" RDT (Resource Director Technology) Allocation - "rdt_a"
CAT (Cache Allocation Technology) - "cat_l3", "cat_l2" CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"
......
...@@ -16641,6 +16641,15 @@ S: Maintained ...@@ -16641,6 +16641,15 @@ S: Maintained
F: drivers/platform/x86/ F: drivers/platform/x86/
F: drivers/platform/olpc/ F: drivers/platform/olpc/
X86 PLATFORM DRIVERS - ARCH
R: Darren Hart <dvhart@infradead.org>
R: Andy Shevchenko <andy@infradead.org>
L: platform-driver-x86@vger.kernel.org
L: x86@kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
S: Maintained
F: arch/x86/platform
X86 VDSO X86 VDSO
M: Andy Lutomirski <luto@kernel.org> M: Andy Lutomirski <luto@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
......
...@@ -446,12 +446,12 @@ config RETPOLINE ...@@ -446,12 +446,12 @@ config RETPOLINE
branches. Requires a compiler with -mindirect-branch=thunk-extern branches. Requires a compiler with -mindirect-branch=thunk-extern
support for full protection. The kernel may run slower. support for full protection. The kernel may run slower.
config X86_RESCTRL config X86_CPU_RESCTRL
bool "Resource Control support" bool "x86 CPU resource control support"
depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD) depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
select KERNFS select KERNFS
help help
Enable Resource Control support. Enable x86 CPU resource control support.
Provide support for the allocation and monitoring of system resources Provide support for the allocation and monitoring of system resources
usage by the CPU. usage by the CPU.
......
...@@ -600,6 +600,14 @@ ENTRY(trampoline_32bit_src) ...@@ -600,6 +600,14 @@ ENTRY(trampoline_32bit_src)
leal TRAMPOLINE_32BIT_PGTABLE_OFFSET(%ecx), %eax leal TRAMPOLINE_32BIT_PGTABLE_OFFSET(%ecx), %eax
movl %eax, %cr3 movl %eax, %cr3
3: 3:
/* Set EFER.LME=1 as a precaution in case hypervsior pulls the rug */
pushl %ecx
movl $MSR_EFER, %ecx
rdmsr
btsl $_EFER_LME, %eax
wrmsr
popl %ecx
/* Enable PAE and LA57 (if required) paging modes */ /* Enable PAE and LA57 (if required) paging modes */
movl $X86_CR4_PAE, %eax movl $X86_CR4_PAE, %eax
cmpl $0, %edx cmpl $0, %edx
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define TRAMPOLINE_32BIT_PGTABLE_OFFSET 0 #define TRAMPOLINE_32BIT_PGTABLE_OFFSET 0
#define TRAMPOLINE_32BIT_CODE_OFFSET PAGE_SIZE #define TRAMPOLINE_32BIT_CODE_OFFSET PAGE_SIZE
#define TRAMPOLINE_32BIT_CODE_SIZE 0x60 #define TRAMPOLINE_32BIT_CODE_SIZE 0x70
#define TRAMPOLINE_32BIT_STACK_END TRAMPOLINE_32BIT_SIZE #define TRAMPOLINE_32BIT_STACK_END TRAMPOLINE_32BIT_SIZE
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* "Big Core" Processors (Branded as Core, Xeon, etc...) * "Big Core" Processors (Branded as Core, Xeon, etc...)
* *
* The "_X" parts are generally the EP and EX Xeons, or the * The "_X" parts are generally the EP and EX Xeons, or the
* "Extreme" ones, like Broadwell-E. * "Extreme" ones, like Broadwell-E, or Atom microserver.
* *
* While adding a new CPUID for a new microarchitecture, add a new * While adding a new CPUID for a new microarchitecture, add a new
* group to keep logically sorted out in chronological order. Within * group to keep logically sorted out in chronological order. Within
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#define INTEL_FAM6_ATOM_GOLDMONT 0x5C /* Apollo Lake */ #define INTEL_FAM6_ATOM_GOLDMONT 0x5C /* Apollo Lake */
#define INTEL_FAM6_ATOM_GOLDMONT_X 0x5F /* Denverton */ #define INTEL_FAM6_ATOM_GOLDMONT_X 0x5F /* Denverton */
#define INTEL_FAM6_ATOM_GOLDMONT_PLUS 0x7A /* Gemini Lake */ #define INTEL_FAM6_ATOM_GOLDMONT_PLUS 0x7A /* Gemini Lake */
#define INTEL_FAM6_ATOM_TREMONT_X 0x86 /* Jacobsville */
/* Xeon Phi */ /* Xeon Phi */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#ifndef _ASM_X86_RESCTRL_SCHED_H #ifndef _ASM_X86_RESCTRL_SCHED_H
#define _ASM_X86_RESCTRL_SCHED_H #define _ASM_X86_RESCTRL_SCHED_H
#ifdef CONFIG_X86_RESCTRL #ifdef CONFIG_X86_CPU_RESCTRL
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/jump_label.h> #include <linux/jump_label.h>
...@@ -88,6 +88,6 @@ static inline void resctrl_sched_in(void) ...@@ -88,6 +88,6 @@ static inline void resctrl_sched_in(void)
static inline void resctrl_sched_in(void) {} static inline void resctrl_sched_in(void) {}
#endif /* CONFIG_X86_RESCTRL */ #endif /* CONFIG_X86_CPU_RESCTRL */
#endif /* _ASM_X86_RESCTRL_SCHED_H */ #endif /* _ASM_X86_RESCTRL_SCHED_H */
...@@ -39,7 +39,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o ...@@ -39,7 +39,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
obj-$(CONFIG_X86_MCE) += mce/ obj-$(CONFIG_X86_MCE) += mce/
obj-$(CONFIG_MTRR) += mtrr/ obj-$(CONFIG_MTRR) += mtrr/
obj-$(CONFIG_MICROCODE) += microcode/ obj-$(CONFIG_MICROCODE) += microcode/
obj-$(CONFIG_X86_RESCTRL) += resctrl/ obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/
obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
......
...@@ -855,7 +855,7 @@ load_microcode_amd(bool save, u8 family, const u8 *data, size_t size) ...@@ -855,7 +855,7 @@ load_microcode_amd(bool save, u8 family, const u8 *data, size_t size)
if (!p) { if (!p) {
return ret; return ret;
} else { } else {
if (boot_cpu_data.microcode == p->patch_id) if (boot_cpu_data.microcode >= p->patch_id)
return ret; return ret;
ret = UCODE_NEW; ret = UCODE_NEW;
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_X86_RESCTRL) += core.o rdtgroup.o monitor.o obj-$(CONFIG_X86_CPU_RESCTRL) += core.o rdtgroup.o monitor.o
obj-$(CONFIG_X86_RESCTRL) += ctrlmondata.o pseudo_lock.o obj-$(CONFIG_X86_CPU_RESCTRL) += ctrlmondata.o pseudo_lock.o
CFLAGS_pseudo_lock.o = -I$(src) CFLAGS_pseudo_lock.o = -I$(src)
...@@ -167,6 +167,9 @@ setup_efi_state(struct boot_params *params, unsigned long params_load_addr, ...@@ -167,6 +167,9 @@ setup_efi_state(struct boot_params *params, unsigned long params_load_addr,
struct efi_info *current_ei = &boot_params.efi_info; struct efi_info *current_ei = &boot_params.efi_info;
struct efi_info *ei = &params->efi_info; struct efi_info *ei = &params->efi_info;
if (!efi_enabled(EFI_RUNTIME_SERVICES))
return 0;
if (!current_ei->efi_memmap_size) if (!current_ei->efi_memmap_size)
return 0; return 0;
......
...@@ -595,7 +595,7 @@ static void show_ldttss(const struct desc_ptr *gdt, const char *name, u16 index) ...@@ -595,7 +595,7 @@ static void show_ldttss(const struct desc_ptr *gdt, const char *name, u16 index)
return; return;
} }
addr = desc.base0 | (desc.base1 << 16) | (desc.base2 << 24); addr = desc.base0 | (desc.base1 << 16) | ((unsigned long)desc.base2 << 24);
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
addr |= ((u64)desc.base3 << 32); addr |= ((u64)desc.base3 << 32);
#endif #endif
......
...@@ -995,7 +995,7 @@ struct task_struct { ...@@ -995,7 +995,7 @@ struct task_struct {
/* cg_list protected by css_set_lock and tsk->alloc_lock: */ /* cg_list protected by css_set_lock and tsk->alloc_lock: */
struct list_head cg_list; struct list_head cg_list;
#endif #endif
#ifdef CONFIG_X86_RESCTRL #ifdef CONFIG_X86_CPU_RESCTRL
u32 closid; u32 closid;
u32 rmid; u32 rmid;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment