Skip to content

Commit 24b888d

Browse files
committed
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)
2 parents cc6810e + e6d4293 commit 24b888d

File tree

13 files changed

+35
-14
lines changed

13 files changed

+35
-14
lines changed

Documentation/x86/resctrl_ui.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Fenghua Yu <fenghua.yu@intel.com>
99
Tony Luck <tony.luck@intel.com>
1010
Vikas Shivappa <vikas.shivappa@intel.com>
1111

12-
This feature is enabled by the CONFIG_X86_RESCTRL and the x86 /proc/cpuinfo
12+
This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86 /proc/cpuinfo
1313
flag bits:
1414
RDT (Resource Director Technology) Allocation - "rdt_a"
1515
CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16641,6 +16641,15 @@ S: Maintained
1664116641
F: drivers/platform/x86/
1664216642
F: drivers/platform/olpc/
1664316643

16644+
X86 PLATFORM DRIVERS - ARCH
16645+
R: Darren Hart <dvhart@infradead.org>
16646+
R: Andy Shevchenko <andy@infradead.org>
16647+
L: platform-driver-x86@vger.kernel.org
16648+
L: x86@kernel.org
16649+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
16650+
S: Maintained
16651+
F: arch/x86/platform
16652+
1664416653
X86 VDSO
1664516654
M: Andy Lutomirski <luto@kernel.org>
1664616655
L: linux-kernel@vger.kernel.org

arch/x86/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,12 @@ config RETPOLINE
446446
branches. Requires a compiler with -mindirect-branch=thunk-extern
447447
support for full protection. The kernel may run slower.
448448

449-
config X86_RESCTRL
450-
bool "Resource Control support"
449+
config X86_CPU_RESCTRL
450+
bool "x86 CPU resource control support"
451451
depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
452452
select KERNFS
453453
help
454-
Enable Resource Control support.
454+
Enable x86 CPU resource control support.
455455

456456
Provide support for the allocation and monitoring of system resources
457457
usage by the CPU.

arch/x86/boot/compressed/head_64.S

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,14 @@ ENTRY(trampoline_32bit_src)
600600
leal TRAMPOLINE_32BIT_PGTABLE_OFFSET(%ecx), %eax
601601
movl %eax, %cr3
602602
3:
603+
/* Set EFER.LME=1 as a precaution in case hypervsior pulls the rug */
604+
pushl %ecx
605+
movl $MSR_EFER, %ecx
606+
rdmsr
607+
btsl $_EFER_LME, %eax
608+
wrmsr
609+
popl %ecx
610+
603611
/* Enable PAE and LA57 (if required) paging modes */
604612
movl $X86_CR4_PAE, %eax
605613
cmpl $0, %edx

arch/x86/boot/compressed/pgtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#define TRAMPOLINE_32BIT_PGTABLE_OFFSET 0
77

88
#define TRAMPOLINE_32BIT_CODE_OFFSET PAGE_SIZE
9-
#define TRAMPOLINE_32BIT_CODE_SIZE 0x60
9+
#define TRAMPOLINE_32BIT_CODE_SIZE 0x70
1010

1111
#define TRAMPOLINE_32BIT_STACK_END TRAMPOLINE_32BIT_SIZE
1212

arch/x86/include/asm/intel-family.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* "Big Core" Processors (Branded as Core, Xeon, etc...)
77
*
88
* The "_X" parts are generally the EP and EX Xeons, or the
9-
* "Extreme" ones, like Broadwell-E.
9+
* "Extreme" ones, like Broadwell-E, or Atom microserver.
1010
*
1111
* While adding a new CPUID for a new microarchitecture, add a new
1212
* group to keep logically sorted out in chronological order. Within
@@ -71,6 +71,7 @@
7171
#define INTEL_FAM6_ATOM_GOLDMONT 0x5C /* Apollo Lake */
7272
#define INTEL_FAM6_ATOM_GOLDMONT_X 0x5F /* Denverton */
7373
#define INTEL_FAM6_ATOM_GOLDMONT_PLUS 0x7A /* Gemini Lake */
74+
#define INTEL_FAM6_ATOM_TREMONT_X 0x86 /* Jacobsville */
7475

7576
/* Xeon Phi */
7677

arch/x86/include/asm/resctrl_sched.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef _ASM_X86_RESCTRL_SCHED_H
33
#define _ASM_X86_RESCTRL_SCHED_H
44

5-
#ifdef CONFIG_X86_RESCTRL
5+
#ifdef CONFIG_X86_CPU_RESCTRL
66

77
#include <linux/sched.h>
88
#include <linux/jump_label.h>
@@ -88,6 +88,6 @@ static inline void resctrl_sched_in(void)
8888

8989
static inline void resctrl_sched_in(void) {}
9090

91-
#endif /* CONFIG_X86_RESCTRL */
91+
#endif /* CONFIG_X86_CPU_RESCTRL */
9292

9393
#endif /* _ASM_X86_RESCTRL_SCHED_H */

arch/x86/kernel/cpu/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
3939
obj-$(CONFIG_X86_MCE) += mce/
4040
obj-$(CONFIG_MTRR) += mtrr/
4141
obj-$(CONFIG_MICROCODE) += microcode/
42-
obj-$(CONFIG_X86_RESCTRL) += resctrl/
42+
obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/
4343

4444
obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
4545

arch/x86/kernel/cpu/microcode/amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ load_microcode_amd(bool save, u8 family, const u8 *data, size_t size)
855855
if (!p) {
856856
return ret;
857857
} else {
858-
if (boot_cpu_data.microcode == p->patch_id)
858+
if (boot_cpu_data.microcode >= p->patch_id)
859859
return ret;
860860

861861
ret = UCODE_NEW;

arch/x86/kernel/cpu/resctrl/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
obj-$(CONFIG_X86_RESCTRL) += core.o rdtgroup.o monitor.o
3-
obj-$(CONFIG_X86_RESCTRL) += ctrlmondata.o pseudo_lock.o
2+
obj-$(CONFIG_X86_CPU_RESCTRL) += core.o rdtgroup.o monitor.o
3+
obj-$(CONFIG_X86_CPU_RESCTRL) += ctrlmondata.o pseudo_lock.o
44
CFLAGS_pseudo_lock.o = -I$(src)

arch/x86/kernel/kexec-bzimage64.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ setup_efi_state(struct boot_params *params, unsigned long params_load_addr,
167167
struct efi_info *current_ei = &boot_params.efi_info;
168168
struct efi_info *ei = &params->efi_info;
169169

170+
if (!efi_enabled(EFI_RUNTIME_SERVICES))
171+
return 0;
172+
170173
if (!current_ei->efi_memmap_size)
171174
return 0;
172175

arch/x86/mm/fault.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ static void show_ldttss(const struct desc_ptr *gdt, const char *name, u16 index)
595595
return;
596596
}
597597

598-
addr = desc.base0 | (desc.base1 << 16) | (desc.base2 << 24);
598+
addr = desc.base0 | (desc.base1 << 16) | ((unsigned long)desc.base2 << 24);
599599
#ifdef CONFIG_X86_64
600600
addr |= ((u64)desc.base3 << 32);
601601
#endif

include/linux/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ struct task_struct {
995995
/* cg_list protected by css_set_lock and tsk->alloc_lock: */
996996
struct list_head cg_list;
997997
#endif
998-
#ifdef CONFIG_X86_RESCTRL
998+
#ifdef CONFIG_X86_CPU_RESCTRL
999999
u32 closid;
10001000
u32 rmid;
10011001
#endif

0 commit comments

Comments
 (0)