An error occurred while fetching folder content.
x86/panic: replace smp_send_stop() with kdump friendly version in panic path
Hidehiro Kawai authored
Daniel Walker reported problems which happens when
crash_kexec_post_notifiers kernel option is enabled
(https://lkml.org/lkml/2015/6/24/44).

In that case, smp_send_stop() is called before entering kdump routines
which assume other CPUs are still online.  As the result, for x86, kdump
routines fail to save other CPUs' registers and disable virtualization
extensions.

To fix this problem, call a new kdump friendly function,
crash_smp_send_stop(), instead of the smp_send_stop() when
crash_kexec_post_notifiers is enabled.  crash_smp_send_stop() is a weak
function, and it just call smp_send_stop().  Architecture codes should
override it so that kdump can work appropriately.  This patch only
provides x86-specific version.

For Xen's PV kernel, just keep the current behavior.

NOTES:

- Right solution would be to place crash_smp_send_stop() before
  __crash_kexec() invocation in all cases and remove smp_send_stop(), but
  we can't do that until all architectures implement own
  crash_smp_send_stop()

- crash_smp_send_stop()-like work is still needed by
  machine_crash_shutdown() because crash_kexec() can be called without
  entering panic()

Fixes: f06e5153 (kernel/panic.c: add "crash_kexec_post_notifiers" option)
Link: http://lkml.kernel.org/r/20160810080948.11028.15344.stgit@sysi4-13.yrl.intra.hitachi.co.jp

Signed-off-by: default avatarHidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Reported-by: default avatarDaniel Walker <dwalker@fifo99.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Xunlei Pang <xpang@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Toshi Kani <toshi.kani@hpe.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Daney <david.daney@cavium.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: "Steven J. Hill" <steven.hill@cavium.com>
Cc: Corey Minyard <cminyard@mvista.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
0ee59413
Name Last commit Last update
..
crypto x86/fpu: Rename i387.h to fpu/api.h
fpu x86/pkeys: Make protection keys an "eager" feature
numachip x86/numachip: Introduce Numachip2 timer mechanisms
trace x86/fpu: Add tracepoints to dump FPU state at key points
uv x86/platform/uv/BAU: Add UV4-specific functions
xen xen: Remove event channel notification through Xen PCI platform device
Kbuild kbuild, x86: Track generated headers with generated-y
a.out-core.h hw-breakpoints: Fix broken a.out format dump
acenv.h ACPICA: Linux: Add support to exclude <asm/acenv.h> inclusion.
acpi.h Merge branch 'acpi-tables'
agp.h agp: kill phys_to_gart() and gart_to_phys()
alternative-asm.h x86/alternatives: Document macros
alternative.h x86/alternatives: Add stack frame dependency to alternative_call_2()
amd_nb.h x86/mce/AMD: Document some functionality
apb_timer.h Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
apic.h x86/apic: Order irq_enter/exit() calls correctly vs. ack_APIC_irq()
apic_flat_64.h x86: Make flat_init_apic_ldr() available
apicdef.h x86/apic: Fix typo EIO_ACK -> EOI_ACK and document it
apm.h x86, asm: use bool for bitops and other assembly outputs
arch_hweight.h x86/hweight: Get rid of the special calling convention
archrandom.h x86, asm: Use CC_SET()/CC_OUT() and static_cpu_has() in archrandom.h
asm-offsets.h kbuild: move asm-offsets.h to include/generated
asm.h x86, asm: define CC_SET() and CC_OUT() macros
atomic.h Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
atomic64_32.h locking/atomic, arch/x86: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
atomic64_64.h
barrier.h
bios_ebda.h
bitops.h
boot.h
bootparam_utils.h
bug.h
bugs.h
cache.h
cacheflush.h
calgary.h
ce4100.h
checksum.h
checksum_32.h
checksum_64.h
clocksource.h
cmdline.h
cmpxchg.h
cmpxchg_32.h
cmpxchg_64.h
compat.h
cpu.h
cpu_device_id.h
cpufeature.h
cpufeatures.h
cpumask.h
crash.h
current.h
debugreg.h
delay.h
desc.h
desc_defs.h
device.h
disabled-features.h
div64.h
dma-mapping.h
dma.h
dmi.h
dwarf2.h
e820.h
edac.h
efi.h
elf.h
emergency-restart.h
entry_arch.h
espfix.h
exec.h
fb.h
fixmap.h
floppy.h
frame.h
ftrace.h
futex.h
gart.h
genapic.h
geode.h
hardirq.h
highmem.h
hpet.h
hugetlb.h
hw_breakpoint.h
hw_irq.h
hypertransport.h
hypervisor.h
i8259.h
ia32.h
ia32_unistd.h
idle.h
imr.h
inat.h
inat_types.h
init.h
insn.h
inst.h
intel-family.h