aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/cpufeatures.h1
-rw-r--r--arch/x86/include/asm/irq_vectors.h7
-rw-r--r--arch/x86/include/asm/jailhouse_para.h2
-rw-r--r--arch/x86/include/asm/pgtable_64_types.h8
-rw-r--r--arch/x86/include/uapi/asm/msgbuf.h31
-rw-r--r--arch/x86/include/uapi/asm/shmbuf.h42
-rw-r--r--arch/x86/kernel/cpu/intel.c3
-rw-r--r--arch/x86/kernel/cpu/microcode/core.c6
-rw-r--r--arch/x86/kernel/cpu/microcode/intel.c2
-rw-r--r--arch/x86/kernel/jailhouse.c2
-rw-r--r--arch/x86/kernel/setup.c6
-rw-r--r--arch/x86/kernel/smpboot.c2
12 files changed, 93 insertions, 19 deletions
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index d554c11e01ff..578793e97431 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -320,6 +320,7 @@
320#define X86_FEATURE_AVX512_VPOPCNTDQ (16*32+14) /* POPCNT for vectors of DW/QW */ 320#define X86_FEATURE_AVX512_VPOPCNTDQ (16*32+14) /* POPCNT for vectors of DW/QW */
321#define X86_FEATURE_LA57 (16*32+16) /* 5-level page tables */ 321#define X86_FEATURE_LA57 (16*32+16) /* 5-level page tables */
322#define X86_FEATURE_RDPID (16*32+22) /* RDPID instruction */ 322#define X86_FEATURE_RDPID (16*32+22) /* RDPID instruction */
323#define X86_FEATURE_CLDEMOTE (16*32+25) /* CLDEMOTE instruction */
323 324
324/* AMD-defined CPU features, CPUID level 0x80000007 (EBX), word 17 */ 325/* AMD-defined CPU features, CPUID level 0x80000007 (EBX), word 17 */
325#define X86_FEATURE_OVERFLOW_RECOV (17*32+ 0) /* MCA overflow recovery support */ 326#define X86_FEATURE_OVERFLOW_RECOV (17*32+ 0) /* MCA overflow recovery support */
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
index 404c5fdff859..548d90bbf919 100644
--- a/arch/x86/include/asm/irq_vectors.h
+++ b/arch/x86/include/asm/irq_vectors.h
@@ -34,11 +34,6 @@
34 * (0x80 is the syscall vector, 0x30-0x3f are for ISA) 34 * (0x80 is the syscall vector, 0x30-0x3f are for ISA)
35 */ 35 */
36#define FIRST_EXTERNAL_VECTOR 0x20 36#define FIRST_EXTERNAL_VECTOR 0x20
37/*
38 * We start allocating at 0x21 to spread out vectors evenly between
39 * priority levels. (0x80 is the syscall vector)
40 */
41#define VECTOR_OFFSET_START 1
42 37
43/* 38/*
44 * Reserve the lowest usable vector (and hence lowest priority) 0x20 for 39 * Reserve the lowest usable vector (and hence lowest priority) 0x20 for
@@ -119,8 +114,6 @@
119#define FIRST_SYSTEM_VECTOR NR_VECTORS 114#define FIRST_SYSTEM_VECTOR NR_VECTORS
120#endif 115#endif
121 116
122#define FPU_IRQ 13
123
124/* 117/*
125 * Size the maximum number of interrupts. 118 * Size the maximum number of interrupts.
126 * 119 *
diff --git a/arch/x86/include/asm/jailhouse_para.h b/arch/x86/include/asm/jailhouse_para.h
index b885a961a150..a34897aef2c2 100644
--- a/arch/x86/include/asm/jailhouse_para.h
+++ b/arch/x86/include/asm/jailhouse_para.h
@@ -1,4 +1,4 @@
1/* SPDX-License-Identifier: GPL2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 */
2 2
3/* 3/*
4 * Jailhouse paravirt detection 4 * Jailhouse paravirt detection
diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
index d5c21a382475..adb47552e6bb 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -105,14 +105,14 @@ extern unsigned int ptrs_per_p4d;
105#define LDT_PGD_ENTRY (pgtable_l5_enabled ? LDT_PGD_ENTRY_L5 : LDT_PGD_ENTRY_L4) 105#define LDT_PGD_ENTRY (pgtable_l5_enabled ? LDT_PGD_ENTRY_L5 : LDT_PGD_ENTRY_L4)
106#define LDT_BASE_ADDR (LDT_PGD_ENTRY << PGDIR_SHIFT) 106#define LDT_BASE_ADDR (LDT_PGD_ENTRY << PGDIR_SHIFT)
107 107
108#define __VMALLOC_BASE_L4 0xffffc90000000000 108#define __VMALLOC_BASE_L4 0xffffc90000000000UL
109#define __VMALLOC_BASE_L5 0xffa0000000000000 109#define __VMALLOC_BASE_L5 0xffa0000000000000UL
110 110
111#define VMALLOC_SIZE_TB_L4 32UL 111#define VMALLOC_SIZE_TB_L4 32UL
112#define VMALLOC_SIZE_TB_L5 12800UL 112#define VMALLOC_SIZE_TB_L5 12800UL
113 113
114#define __VMEMMAP_BASE_L4 0xffffea0000000000 114#define __VMEMMAP_BASE_L4 0xffffea0000000000UL
115#define __VMEMMAP_BASE_L5 0xffd4000000000000 115#define __VMEMMAP_BASE_L5 0xffd4000000000000UL
116 116
117#ifdef CONFIG_DYNAMIC_MEMORY_LAYOUT 117#ifdef CONFIG_DYNAMIC_MEMORY_LAYOUT
118# define VMALLOC_START vmalloc_base 118# define VMALLOC_START vmalloc_base
diff --git a/arch/x86/include/uapi/asm/msgbuf.h b/arch/x86/include/uapi/asm/msgbuf.h
index 809134c644a6..90ab9a795b49 100644
--- a/arch/x86/include/uapi/asm/msgbuf.h
+++ b/arch/x86/include/uapi/asm/msgbuf.h
@@ -1 +1,32 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef __ASM_X64_MSGBUF_H
3#define __ASM_X64_MSGBUF_H
4
5#if !defined(__x86_64__) || !defined(__ILP32__)
1#include <asm-generic/msgbuf.h> 6#include <asm-generic/msgbuf.h>
7#else
8/*
9 * The msqid64_ds structure for x86 architecture with x32 ABI.
10 *
11 * On x86-32 and x86-64 we can just use the generic definition, but
12 * x32 uses the same binary layout as x86_64, which is differnet
13 * from other 32-bit architectures.
14 */
15
16struct msqid64_ds {
17 struct ipc64_perm msg_perm;
18 __kernel_time_t msg_stime; /* last msgsnd time */
19 __kernel_time_t msg_rtime; /* last msgrcv time */
20 __kernel_time_t msg_ctime; /* last change time */
21 __kernel_ulong_t msg_cbytes; /* current number of bytes on queue */
22 __kernel_ulong_t msg_qnum; /* number of messages in queue */
23 __kernel_ulong_t msg_qbytes; /* max number of bytes on queue */
24 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
25 __kernel_pid_t msg_lrpid; /* last receive pid */
26 __kernel_ulong_t __unused4;
27 __kernel_ulong_t __unused5;
28};
29
30#endif
31
32#endif /* __ASM_GENERIC_MSGBUF_H */
diff --git a/arch/x86/include/uapi/asm/shmbuf.h b/arch/x86/include/uapi/asm/shmbuf.h
index 83c05fc2de38..644421f3823b 100644
--- a/arch/x86/include/uapi/asm/shmbuf.h
+++ b/arch/x86/include/uapi/asm/shmbuf.h
@@ -1 +1,43 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef __ASM_X86_SHMBUF_H
3#define __ASM_X86_SHMBUF_H
4
5#if !defined(__x86_64__) || !defined(__ILP32__)
1#include <asm-generic/shmbuf.h> 6#include <asm-generic/shmbuf.h>
7#else
8/*
9 * The shmid64_ds structure for x86 architecture with x32 ABI.
10 *
11 * On x86-32 and x86-64 we can just use the generic definition, but
12 * x32 uses the same binary layout as x86_64, which is differnet
13 * from other 32-bit architectures.
14 */
15
16struct shmid64_ds {
17 struct ipc64_perm shm_perm; /* operation perms */
18 size_t shm_segsz; /* size of segment (bytes) */
19 __kernel_time_t shm_atime; /* last attach time */
20 __kernel_time_t shm_dtime; /* last detach time */
21 __kernel_time_t shm_ctime; /* last change time */
22 __kernel_pid_t shm_cpid; /* pid of creator */
23 __kernel_pid_t shm_lpid; /* pid of last operator */
24 __kernel_ulong_t shm_nattch; /* no. of current attaches */
25 __kernel_ulong_t __unused4;
26 __kernel_ulong_t __unused5;
27};
28
29struct shminfo64 {
30 __kernel_ulong_t shmmax;
31 __kernel_ulong_t shmmin;
32 __kernel_ulong_t shmmni;
33 __kernel_ulong_t shmseg;
34 __kernel_ulong_t shmall;
35 __kernel_ulong_t __unused1;
36 __kernel_ulong_t __unused2;
37 __kernel_ulong_t __unused3;
38 __kernel_ulong_t __unused4;
39};
40
41#endif
42
43#endif /* __ASM_X86_SHMBUF_H */
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index b9693b80fc21..60d1897041da 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -835,6 +835,9 @@ static const struct _tlb_table intel_tlb_table[] = {
835 { 0x5d, TLB_DATA_4K_4M, 256, " TLB_DATA 4 KByte and 4 MByte pages" }, 835 { 0x5d, TLB_DATA_4K_4M, 256, " TLB_DATA 4 KByte and 4 MByte pages" },
836 { 0x61, TLB_INST_4K, 48, " TLB_INST 4 KByte pages, full associative" }, 836 { 0x61, TLB_INST_4K, 48, " TLB_INST 4 KByte pages, full associative" },
837 { 0x63, TLB_DATA_1G, 4, " TLB_DATA 1 GByte pages, 4-way set associative" }, 837 { 0x63, TLB_DATA_1G, 4, " TLB_DATA 1 GByte pages, 4-way set associative" },
838 { 0x6b, TLB_DATA_4K, 256, " TLB_DATA 4 KByte pages, 8-way associative" },
839 { 0x6c, TLB_DATA_2M_4M, 128, " TLB_DATA 2 MByte or 4 MByte pages, 8-way associative" },
840 { 0x6d, TLB_DATA_1G, 16, " TLB_DATA 1 GByte pages, fully associative" },
838 { 0x76, TLB_INST_2M_4M, 8, " TLB_INST 2-MByte or 4-MByte pages, fully associative" }, 841 { 0x76, TLB_INST_2M_4M, 8, " TLB_INST 2-MByte or 4-MByte pages, fully associative" },
839 { 0xb0, TLB_INST_4K, 128, " TLB_INST 4 KByte pages, 4-way set associative" }, 842 { 0xb0, TLB_INST_4K, 128, " TLB_INST 4 KByte pages, 4-way set associative" },
840 { 0xb1, TLB_INST_2M_4M, 4, " TLB_INST 2M pages, 4-way, 8 entries or 4M pages, 4-way entries" }, 843 { 0xb1, TLB_INST_2M_4M, 4, " TLB_INST 2M pages, 4-way, 8 entries or 4M pages, 4-way entries" },
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 10c4fc2c91f8..77e201301528 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -564,14 +564,12 @@ static int __reload_late(void *info)
564 apply_microcode_local(&err); 564 apply_microcode_local(&err);
565 spin_unlock(&update_lock); 565 spin_unlock(&update_lock);
566 566
567 /* siblings return UCODE_OK because their engine got updated already */
567 if (err > UCODE_NFOUND) { 568 if (err > UCODE_NFOUND) {
568 pr_warn("Error reloading microcode on CPU %d\n", cpu); 569 pr_warn("Error reloading microcode on CPU %d\n", cpu);
569 return -1; 570 ret = -1;
570 /* siblings return UCODE_OK because their engine got updated already */
571 } else if (err == UCODE_UPDATED || err == UCODE_OK) { 571 } else if (err == UCODE_UPDATED || err == UCODE_OK) {
572 ret = 1; 572 ret = 1;
573 } else {
574 return ret;
575 } 573 }
576 574
577 /* 575 /*
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 32b8e5724f96..1c2cfa0644aa 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -485,7 +485,6 @@ static void show_saved_mc(void)
485 */ 485 */
486static void save_mc_for_early(u8 *mc, unsigned int size) 486static void save_mc_for_early(u8 *mc, unsigned int size)
487{ 487{
488#ifdef CONFIG_HOTPLUG_CPU
489 /* Synchronization during CPU hotplug. */ 488 /* Synchronization during CPU hotplug. */
490 static DEFINE_MUTEX(x86_cpu_microcode_mutex); 489 static DEFINE_MUTEX(x86_cpu_microcode_mutex);
491 490
@@ -495,7 +494,6 @@ static void save_mc_for_early(u8 *mc, unsigned int size)
495 show_saved_mc(); 494 show_saved_mc();
496 495
497 mutex_unlock(&x86_cpu_microcode_mutex); 496 mutex_unlock(&x86_cpu_microcode_mutex);
498#endif
499} 497}
500 498
501static bool load_builtin_intel_microcode(struct cpio_data *cp) 499static bool load_builtin_intel_microcode(struct cpio_data *cp)
diff --git a/arch/x86/kernel/jailhouse.c b/arch/x86/kernel/jailhouse.c
index fa183a131edc..a15fe0e92cf9 100644
--- a/arch/x86/kernel/jailhouse.c
+++ b/arch/x86/kernel/jailhouse.c
@@ -1,4 +1,4 @@
1// SPDX-License-Identifier: GPL2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Jailhouse paravirt_ops implementation 3 * Jailhouse paravirt_ops implementation
4 * 4 *
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 6285697b6e56..5c623dfe39d1 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -50,6 +50,7 @@
50#include <linux/init_ohci1394_dma.h> 50#include <linux/init_ohci1394_dma.h>
51#include <linux/kvm_para.h> 51#include <linux/kvm_para.h>
52#include <linux/dma-contiguous.h> 52#include <linux/dma-contiguous.h>
53#include <xen/xen.h>
53 54
54#include <linux/errno.h> 55#include <linux/errno.h>
55#include <linux/kernel.h> 56#include <linux/kernel.h>
@@ -534,6 +535,11 @@ static void __init reserve_crashkernel(void)
534 high = true; 535 high = true;
535 } 536 }
536 537
538 if (xen_pv_domain()) {
539 pr_info("Ignoring crashkernel for a Xen PV domain\n");
540 return;
541 }
542
537 /* 0 means: find the address automatically */ 543 /* 0 means: find the address automatically */
538 if (crash_base <= 0) { 544 if (crash_base <= 0) {
539 /* 545 /*
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 45175b81dd5b..0f1cbb042f49 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1571,6 +1571,8 @@ static inline void mwait_play_dead(void)
1571 void *mwait_ptr; 1571 void *mwait_ptr;
1572 int i; 1572 int i;
1573 1573
1574 if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
1575 return;
1574 if (!this_cpu_has(X86_FEATURE_MWAIT)) 1576 if (!this_cpu_has(X86_FEATURE_MWAIT))
1575 return; 1577 return;
1576 if (!this_cpu_has(X86_FEATURE_CLFLUSH)) 1578 if (!this_cpu_has(X86_FEATURE_CLFLUSH))