linux_dsm_epyc7002/arch/x86/kernel
Wanpeng Li 34226b6b70 KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized
static_key_disable_cpuslocked(): static key 'virt_spin_lock_key+0x0/0x20' used before call to jump_label_init()
 WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:161 static_key_disable_cpuslocked+0x61/0x80
 RIP: 0010:static_key_disable_cpuslocked+0x61/0x80
 Call Trace:
  static_key_disable+0x16/0x20
  start_kernel+0x192/0x4b3
  secondary_startup_64+0xa5/0xb0

Qspinlock will be choosed when dedicated pCPUs are available, however, the
static virt_spin_lock_key is set in kvm_spinlock_init() before jump_label_init()
has been called, which will result in a WARN(). This patch fixes it by delaying
the virt_spin_lock_key setup to .smp_prepare_cpus().

Reported-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Fixes: b2798ba0b8 ("KVM: X86: Choose qspinlock when dedicated physical CPUs are available")
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2018-03-28 22:47:06 +02:00
..
acpi ACPI: SPCR: Make SPCR available to x86 2018-02-07 11:39:58 +01:00
apic Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-02-26 09:34:21 -08:00
cpu x86/kvm/vmx: avoid expensive rdmsr for MSR_GS_BASE 2018-03-16 22:03:54 +01:00
fpu Merge commit 'upstream-x86-entry' into WIP.x86/mm 2017-12-17 12:58:53 +01:00
kprobes Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-01-21 10:48:35 -08:00
.gitignore
alternative.c x86/paravirt: Remove 'noreplace-paravirt' cmdline option 2018-01-31 10:37:45 +01:00
amd_gart_64.c dma-mapping: move swiotlb arch helpers to a new header 2018-01-10 16:40:54 +01:00
amd_nb.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-15 01:15:52 +01:00
apb_timer.c
aperture_64.c x86/gart: Exclude GART aperture from vmcore 2018-01-11 15:09:24 +01:00
apm_32.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
asm-offsets_32.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-15 01:15:52 +01:00
asm-offsets_64.c x86/entry/64: Separate cpu_current_top_of_stack from TSS.sp0 2017-12-17 13:59:56 +01:00
asm-offsets.c x86/mm: Use/Fix PCID to optimize user/kernel switches 2017-12-23 21:13:00 +01:00
audit_64.c
bootflag.c
check.c
cpuid.c
crash_dump_32.c
crash_dump_64.c
crash.c resource: Fix resource_size.cocci warnings 2017-11-07 20:44:56 +01:00
devicetree.c x86: remove arch specific early_init_dt_alloc_memory_arch 2018-01-30 11:17:37 -06:00
doublefault.c x86/entry: Fix assumptions that the HW TSS is at the beginning of cpu_tss 2017-12-17 13:59:55 +01:00
dumpstack_32.c x86/entry: Rename SYSENTER_stack to CPU_ENTRY_AREA_entry_stack 2017-12-22 20:13:02 +01:00
dumpstack_64.c x86/entry: Rename SYSENTER_stack to CPU_ENTRY_AREA_entry_stack 2017-12-22 20:13:02 +01:00
dumpstack.c x86/dumpstack: Avoid uninitlized variable 2018-02-02 23:33:50 +01:00
e820.c
early_printk.c
early-quirks.c x86/gpu: add CFL to early quirks 2017-12-15 13:18:00 -08:00
ebda.c
eisa.c
espfix_64.c kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK 2017-11-15 18:21:04 -08:00
ftrace_32.S x86/retpoline/ftrace: Convert ftrace assembler indirect jumps 2018-01-12 00:14:30 +01:00
ftrace_64.S Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-01-28 12:19:23 -08:00
ftrace.c
head32.c
head64.c x86/mm: Encrypt the initrd earlier for BSP microcode update 2018-01-16 01:50:59 +01:00
head_32.S x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-15 01:15:52 +01:00
head_64.S x86/boot, objtool: Annotate indirect jump in secondary_startup_64() 2018-02-21 09:05:03 +01:00
hpet.c
hw_breakpoint.c
i8237.c
i8253.c
i8259.c Merge branch 'linus' into x86/apic, to resolve conflicts 2017-11-07 10:51:10 +01:00
idt.c x86/idt: Mark IDT tables __initconst 2018-01-14 20:09:45 +01:00
io_delay.c
ioport.c x86/entry/64: Make cpu_entry_area.tss read-only 2017-12-17 14:27:52 +01:00
irq_32.c x86/retpoline/irq32: Convert assembler indirect jumps 2018-01-12 00:14:32 +01:00
irq_64.c x86/irq/64: Print the offending IP in the stack overflow warning 2017-12-17 13:59:53 +01:00
irq_work.c
irq.c x86/irq: Count Hyper-V reenlightenment interrupts 2018-01-30 23:55:33 +01:00
irqinit.c Revert "x86/apic: Remove init_bsp_APIC()" 2018-01-14 12:14:51 +01:00
itmt.c x86/headers: Remove duplicate #includes 2017-12-12 11:32:24 +01:00
jailhouse.c x86/jailhouse: Respect pci=lastbus command line settings 2018-01-20 08:15:44 +01:00
jump_label.c
kdebugfs.c
kexec-bzimage64.c
kgdb.c
ksysfs.c
kvm.c KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized 2018-03-28 22:47:06 +02:00
kvmclock.c xen: features and fixes for v4.15-rc1 2017-11-16 13:06:27 -08:00
ldt.c x86/ldt: Make LDT pgtable free conditional 2017-12-31 16:55:09 +01:00
livepatch.c
machine_kexec_32.c x86-32: Fix kexec with stack canary (CONFIG_CC_STACKPROTECTOR) 2017-12-27 20:59:41 +01:00
machine_kexec_64.c x86: Treat R_X86_64_PLT32 as R_X86_64_PC32 2018-02-22 09:01:10 -08:00
Makefile Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-01-29 18:17:39 -08:00
mmconf-fam10h_64.c
module.c x86: Treat R_X86_64_PLT32 as R_X86_64_PC32 2018-02-22 09:01:10 -08:00
mpparse.c Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-02-14 17:02:15 -08:00
msr.c
nmi_selftest.c
nmi.c
paravirt_patch_32.c
paravirt_patch_64.c x86/paravirt: Dont patch flush_tlb_single 2017-12-17 14:27:52 +01:00
paravirt-spinlocks.c
paravirt.c x86/mm: Rename flush_tlb_single() and flush_tlb_one() to __flush_tlb_one_[user|kernel]() 2018-02-15 01:15:52 +01:00
pci-calgary_64.c
pci-dma.c dma-mapping: add an arch_dma_supported hook 2018-01-15 09:34:59 +01:00
pci-iommu_table.c
pci-nommu.c dma-mapping: move swiotlb arch helpers to a new header 2018-01-10 16:40:54 +01:00
pci-swiotlb.c swiotlb: rename swiotlb_free to swiotlb_exit 2018-01-15 09:35:39 +01:00
pcspeaker.c
perf_regs.c
platform-quirks.c x86/platform: Control warm reset setup via legacy feature flag 2018-01-14 21:11:53 +01:00
pmem.c resource: Provide resource struct in resource walk callback 2017-11-07 15:35:57 +01:00
probe_roms.c
process_32.c x86/entry/64: Make cpu_entry_area.tss read-only 2017-12-17 14:27:52 +01:00
process_64.c x86/kvm/vmx: read MSR_{FS,KERNEL_GS}_BASE from current->thread 2018-03-16 22:03:53 +01:00
process.c Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-01-30 13:01:09 -08:00
ptrace.c x86/asm: Move 'status' from thread_struct to thread_info 2018-01-30 15:30:36 +01:00
pvclock.c x86/pvclock: add setter for pvclock_pvti_cpu0_va 2017-11-08 16:33:14 -05:00
quirks.c
reboot_fixups_32.c
reboot.c
relocate_kernel_32.S
relocate_kernel_64.S x86/kexec: Make kexec (mostly) work in 5-level paging mode 2018-01-31 08:39:40 +01:00
resource.c
rtc.c
setup_percpu.c x86/cpu_entry_area: Sync cpu_entry_area to initial_page_table 2018-03-01 09:48:27 +01:00
setup.c x86/cpu_entry_area: Sync cpu_entry_area to initial_page_table 2018-03-01 09:48:27 +01:00
signal_compat.c signal: Unify and correct copy_siginfo_to_user32 2018-01-15 19:56:20 -06:00
signal.c x86/asm: Move 'status' from thread_struct to thread_info 2018-01-30 15:30:36 +01:00
smp.c
smpboot.c x86/topology: Update the 'cpu cores' field in /proc/cpuinfo correctly across CPU hotplug operations 2018-02-23 08:47:47 +01:00
stacktrace.c Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-01-03 16:41:07 -08:00
step.c
sys_x86_64.c x86/mm: Prevent non-MAP_FIXED mapping across DEFAULT_MAP_WINDOW border 2017-11-16 11:43:11 +01:00
sysfb_efi.c
sysfb_simplefb.c
sysfb.c
tboot.c x86/pti: Make unpoison of pgd for trusted boot work for real 2018-01-11 23:36:59 +01:00
tce_64.c
time.c x86/time: Unconditionally register legacy timer interrupt 2018-01-14 20:18:23 +01:00
tls.c x86/ldt: Make the LDT mapping RO 2017-12-23 21:13:01 +01:00
tls.h
topology.c
trace_clock.c
tracepoint.c
traps.c x86/debug: Use UD2 for WARN() 2018-02-15 01:15:50 +01:00
tsc_msr.c
tsc_sync.c Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 19:07:38 -08:00
tsc.c x86/tsc: Introduce early tsc clocksource 2018-01-14 20:18:23 +01:00
umip.c x86/umip: Fix insn_get_code_seg_params()'s return value 2017-11-23 20:17:59 +01:00
unwind_frame.c
unwind_guess.c
unwind_orc.c extable: Make init_kernel_text() global 2018-02-21 16:54:06 +01:00
uprobes.c uprobes/x86: Emulate push insns for uprobe on x86 2017-12-11 18:42:11 +01:00
verify_cpu.S
vm86_32.c Merge commit 'upstream-x86-entry' into WIP.x86/mm 2017-12-17 12:58:53 +01:00
vmlinux.lds.S retpoline: Introduce start/end markers of indirect thunk 2018-01-19 16:31:28 +01:00
vsmp_64.c
x86_init.c Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 18:29:23 -08:00