linux/arch/x86/kernel
Thomas Gleixner 1e90a13d0c x86/smpboot: Init apic mapping before usage
The recent changes, which forced the registration of the boot cpu on UP
systems, which do not have ACPI tables, have been fixed for systems w/o
local APIC, but left a wreckage for systems which have neither ACPI nor
mptables, but the CPU has an APIC, e.g. virtualbox.

The boot process crashes in prefill_possible_map() as it wants to register
the boot cpu, which needs to access the local apic, but the local APIC is
not yet mapped.

There is no reason why init_apic_mapping() can't be invoked before
prefill_possible_map(). So instead of playing another silly early mapping
game, as the ACPI/mptables code does, we just move init_apic_mapping()
before the call to prefill_possible_map().

In hindsight, I should have noticed that combination earlier.

Sorry for the churn (also in stable)!

Fixes: ff8560512b ("x86/boot/smp: Don't try to poke disabled/non-existent APIC")
Reported-and-debugged-by: Michal Necasek <michal.necasek@oracle.com>
Reported-and-tested-by: Wolfgang Bauer <wbauer@tmo.at>
Cc: prarit@redhat.com
Cc: ville.syrjala@linux.intel.com
Cc: michael.thayer@oracle.com
Cc: knut.osmundsen@oracle.com
Cc: frank.mehnert@oracle.com
Cc: Borislav Petkov <bp@alien8.de>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610282114380.5053@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-10-29 14:00:46 +02:00
..
acpi ACPI/PCI: pci_link: penalize SCI correctly 2016-10-24 14:18:14 +02:00
apic Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-10 10:59:07 -07:00
cpu x86/microcode/AMD: Fix more fallout from CONFIG_RANDOMIZE_MEMORY=y 2016-10-28 10:29:59 +02:00
fpu x86/cpufeature: Add AVX512_4VNNIW and AVX512_4FMAPS features 2016-10-19 17:37:13 +02:00
kprobes kprobes: Unpoison stack in jprobe_return() for KASAN 2016-10-16 11:02:31 +02:00
.gitignore
alternative.c
amd_gart_64.c
amd_nb.c
apb_timer.c
aperture_64.c
apm_32.c
asm-offsets_32.c sched/x86: Rewrite the switch_to() code 2016-08-24 12:31:41 +02:00
asm-offsets_64.c sched/x86: Rewrite the switch_to() code 2016-08-24 12:31:41 +02:00
asm-offsets.c x86: Move thread_info into task_struct 2016-09-15 08:25:13 +02:00
audit_64.c
bootflag.c
check.c
cpuid.c
crash_dump_32.c
crash_dump_64.c
crash.c x86/panic: replace smp_send_stop() with kdump friendly version in panic path 2016-10-11 15:06:32 -07:00
devicetree.c
doublefault.c
dumpstack_32.c x86/dumpstack: Remove dump_trace() and related callbacks 2016-09-20 08:29:34 +02:00
dumpstack_64.c x86/dumpstack: Remove dump_trace() and related callbacks 2016-09-20 08:29:34 +02:00
dumpstack.c x86/dumpstack: Fix show_stack() task pointer regression 2016-09-20 23:36:37 +02:00
e820.c x86/e820: Don't merge consecutive E820_PRAM ranges 2016-10-16 11:16:48 +02:00
early_printk.c
early-quirks.c Merge tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux 2016-10-11 18:12:22 -07:00
ebda.c
espfix_64.c
ftrace.c ftrace/x86: Implement HAVE_FUNCTION_GRAPH_RET_ADDR_PTR 2016-08-24 12:15:15 +02:00
head32.c
head64.c
head_32.S Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-10-14 14:26:58 -07:00
head_64.S Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-10-14 14:26:58 -07:00
hpet.c x86/hpet: Reduce HPET counter read contention 2016-09-09 15:16:19 +02:00
hw_breakpoint.c
i8237.c
i8253.c
i8259.c
io_delay.c
ioport.c
irq_32.c
irq_64.c x86: Move thread_info into task_struct 2016-09-15 08:25:13 +02:00
irq_work.c
irq.c
irqinit.c
jump_label.c
kdebugfs.c
kexec-bzimage64.c x86/e820: Prepare e280 code for switch to dynamic storage 2016-09-21 15:02:12 +02:00
kgdb.c sched/x86: Add 'struct inactive_task_frame' to better document the sleeping task stack frame 2016-08-24 12:27:41 +02:00
ksysfs.c
kvm.c Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 19:43:08 -07:00
kvmclock.c Merge branch 'linus' into x86/asm, to pick up recent fixes 2016-09-15 08:24:53 +02:00
ldt.c
livepatch.c livepatch/x86: apply alternatives and paravirt patches after relocations 2016-08-18 23:41:55 +02:00
machine_kexec_32.c
machine_kexec_64.c kdump, vmcoreinfo: report memory sections virtual addresses 2016-10-11 15:06:33 -07:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-10-14 14:26:58 -07:00
mcount_64.S x86: Fix export for mcount and __fentry__ 2016-10-26 12:38:17 +02:00
mmconf-fam10h_64.c
module.c
mpparse.c
msr.c
nmi_selftest.c
nmi.c
paravirt_patch_32.c x86, locking/spinlocks: Remove ticket (spin)lock implementation 2016-09-30 10:56:00 +02:00
paravirt_patch_64.c x86, locking/spinlocks: Remove ticket (spin)lock implementation 2016-09-30 10:56:00 +02:00
paravirt-spinlocks.c x86, locking/spinlocks: Remove ticket (spin)lock implementation 2016-09-30 10:56:00 +02:00
paravirt.c x86/asm: Get rid of __read_cr4_safe() 2016-09-30 12:40:12 +02:00
pci-calgary_64.c
pci-dma.c
pci-iommu_table.c
pci-nommu.c
pci-swiotlb.c
pcspeaker.c
perf_regs.c
platform-quirks.c
pmem.c
probe_roms.c
process_32.c x86/asm: Get rid of __read_cr4_safe() 2016-09-30 12:40:12 +02:00
process_64.c Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-10 11:01:51 -07:00
process.c x86: use simpler API for random address requests 2016-10-11 15:06:32 -07:00
ptrace.c Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 17:29:01 -07:00
pvclock.c KVM: x86: introduce get_kvmclock_ns 2016-09-20 09:26:15 +02:00
quirks.c x86/quirks: Hide maybe-uninitialized warning 2016-10-25 11:45:13 +02:00
reboot_fixups_32.c
reboot.c
relocate_kernel_32.S
relocate_kernel_64.S
resource.c x86/e820: Prepare e280 code for switch to dynamic storage 2016-09-21 15:02:12 +02:00
rtc.c
setup_percpu.c Merge branch 'x86/mm' into x86/asm, to unify the two branches for simplicity 2016-09-08 08:41:52 +02:00
setup.c x86/smpboot: Init apic mapping before usage 2016-10-29 14:00:46 +02:00
signal_compat.c x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi() 2016-10-20 13:05:15 +02:00
signal.c Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 17:29:01 -07:00
smp.c Linux 4.9-rc1 2016-10-16 11:31:39 +02:00
smpboot.c x86/boot/smp: Don't try to poke disabled/non-existent APIC 2016-10-22 10:47:54 +02:00
stacktrace.c x86/stacktrace: Convert save_stack_trace_*() to use the new unwinder 2016-09-20 08:29:33 +02:00
step.c mm: replace access_process_vm() write parameter with gup_flags 2016-10-19 08:31:25 -07:00
sys_x86_64.c x86: use simpler API for random address requests 2016-10-11 15:06:32 -07:00
sysfb_efi.c
sysfb_simplefb.c
sysfb.c
tboot.c x86/e820: Prepare e280 code for switch to dynamic storage 2016-09-21 15:02:12 +02:00
tce_64.c
test_nx.c
test_rodata.c
time.c
tls.c
tls.h
topology.c
trace_clock.c
tracepoint.c
traps.c x86/mm: Improve stack-overflow #PF handling 2016-09-08 08:47:20 +02:00
tsc_msr.c
tsc_sync.c
tsc.c x86/tsc: Add additional Intel CPU models to the crystal quirk list 2016-09-20 01:00:32 +02:00
unwind_frame.c x86/unwind: Add new unwind interface and implementations 2016-09-20 08:29:33 +02:00
unwind_guess.c x86/unwind: Fix empty stack dereference in guess unwinder 2016-10-25 11:36:43 +02:00
uprobes.c
verify_cpu.S
vm86_32.c
vmlinux.lds.S nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00
vsmp_64.c
x86_init.c