[lkml]   [2016]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[V4 PATCH 0/2] kexec: crash_kexec_post_notifiers boot option related fixes
Daniel Walker reported problems which happens when
crash_kexec_post_notifiers kernel option is enabled

In that case, smp_send_stop() is called before entering kdump routines
which assume other CPUs are still online. This causes some issues
depending on architectures. For example, for x86, kdump routines fail
to save other CPUs' registers and disable virtualization extensions.
For MIPS OCTEON, it fails to stop the watchdog timer.

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 set supports only x86 and MIPS.

- 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()-like work is still needed by
machine_crash_shutdown() because crash_kexec() can be called without
entering panic()

Changes in V4:
- Keep to use smp_send_stop if crash_kexec_post_notifiers is not set
- Rename panic_smp_send_stop to crash_smp_send_stop
- Don't change the behavior for Xen's PV kernel
- Support MIPS

Changes in V3:
- Revise comments, description, and symbol names (the logic doesn't
- Make crash_kexec_post_notifiers boot option modifiable after boot

Changes in V2:
- Replace smp_send_stop() call with crash_kexec version which
saves cpu states and does cleanups instead of changing execution
- Drop a fix for Problem 1
- Drop other patches because they aren't needed anymore



Hidehiro Kawai (2):
x86/panic: Replace smp_send_stop() with kdump friendly version in panic path
mips/panic: Replace smp_send_stop() with kdump friendly version in panic path

arch/mips/cavium-octeon/setup.c | 14 +++++++++++
arch/mips/include/asm/kexec.h | 1 +
arch/mips/kernel/crash.c | 18 ++++++++++++++-
arch/mips/kernel/machine_kexec.c | 1 +
arch/x86/include/asm/kexec.h | 1 +
arch/x86/include/asm/smp.h | 1 +
arch/x86/kernel/crash.c | 22 +++++++++++++++---
arch/x86/kernel/smp.c | 5 ++++
kernel/panic.c | 47 ++++++++++++++++++++++++++++++++------
9 files changed, 99 insertions(+), 11 deletions(-)

Hidehiro Kawai
Hitachi, Ltd. Research & Development Group

 \ /
  Last update: 2016-08-10 23:21    [W:0.126 / U:1.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site