mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "'Dave Young'" <dyoung@redhat.com>
To: "河合英宏 / KAWAI,HIDEHIRO" <hidehiro.kawai.ez@hitachi.com>
Cc: "xlpang@redhat.com" <xlpang@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Daniel Walker <dwalker@fifo99.com>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	Baoquan He <bhe@redhat.com>, Toshi Kani <toshi.kani@hpe.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>,
	Ingo Molnar <mingo@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@suse.de>, Vivek Goyal <vgoyal@redhat.com>,
	David Vrabel <david.vrabel@citrix.com>
Subject: Re: [V4 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version in panic path
Date: Thu, 22 Sep 2016 09:53:54 +0800	[thread overview]
Message-ID: <20160922015354.GA12860@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <04EAB7311EE43145B2D3536183D1A84454D101A4@GSjpTKYDCembx31.service.hitachi.net>

Hi, 河合英宏

Thanks for the patch log update, it looks good to me.

Acked-by: Dave Young <dyoung@redhat.com>

On 09/20/16 at 11:22am, 河合英宏 / KAWAI,HIDEHIRO wrote:
> Here is the revised commit description reflecting Dave's
> comment.  Cc list was copied from -mm version.
> 
> From: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> Subject: x86/panic: replace smp_send_stop() with kdump friendly version in panic path
> 
> This patch fixes a problem reported by Daniel Walker
> (https://lkml.org/lkml/2015/6/24/44).
> 
> When kernel panics with crash_kexec_post_notifiers kernel parameter
> enabled, other CPUs are stopped by smp_send_stop() instead of
> machine_crash_shutdown() in __crash_kexec() path.
> 
>   panic()
>     if crash_kexec_post_notifiers == 1
>       smp_send_stop()
>       atomic_notifier_call_chain()
>       kmsg_dump()
>     __crash_kexec()
>       machine_crash_shutdown()
> 
> Different from smp_send_stop(), machine_crash_shutdown() stops other
> CPUs with extra works for kdump.  So, if smp_send_stop() stops other
> CPUs in advance, these extra works won't be done.  For x86, kdump
> routines miss 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.
> As for Dom0, it doesn't use crash_kexec routines, and it relies on
> panic notifier chain.  At the end of the chain, a hypercall is
> issued which requests the hypervisor to execute kdump.  This means
> regardless of crash_kexec_post_notifiers setting, smp_send_stop().
> For PV HVM, it would work similarly to baremetal kernels with extra
> cleanups for hypervisor.  It doesn't need additional care.
> 
> 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
> 
> Changes in V3:
> - Revise comments, description, and symbol names
> 
> Changes in V2:
> - Replace smp_send_stop() call with crash_kexec version which
>   saves cpu states and cleans up VMX/SVM
> - Drop a fix for Problem 1 at this moment
> 
> Fixes: f06e5153f4ae (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: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> Reported-by: Daniel 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: Andrew Morton <akpm@linux-foundation.org>
> 

[snip]

Thanks
Dave

  reply	other threads:[~2016-09-22  1:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-10  8:09 [V4 PATCH 0/2] kexec: crash_kexec_post_notifiers boot option related fixes Hidehiro Kawai
2016-08-10  8:09 ` [V4 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version in panic path Hidehiro Kawai
2016-08-12  3:16   ` Dave Young
2016-08-15 11:22     ` 河合英宏 / KAWAI,HIDEHIRO
2016-09-20  7:40       ` Xunlei Pang
2016-09-20  8:53         ` 河合英宏 / KAWAI,HIDEHIRO
2016-09-20 11:22           ` 河合英宏 / KAWAI,HIDEHIRO
2016-09-22  1:53             ` 'Dave Young' [this message]
2016-08-10  8:09 ` [V4 PATCH 2/2] mips/panic: " Hidehiro Kawai
2016-08-12  3:17   ` Dave Young
2016-08-12 13:55     ` Corey Minyard
2016-08-15 11:35       ` 河合英宏 / KAWAI,HIDEHIRO
2016-08-15 17:06         ` Corey Minyard
2016-08-15 18:01           ` Corey Minyard
2016-08-16 10:29             ` 河合英宏 / KAWAI,HIDEHIRO
2016-08-18 21:18   ` Corey Minyard
2016-09-20 11:37     ` 河合英宏 / KAWAI,HIDEHIRO

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160922015354.GA12860@dhcp-128-65.nay.redhat.com \
    --to=dyoung@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=bp@suse.de \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=david.vrabel@citrix.com \
    --cc=dwalker@fifo99.com \
    --cc=ebiederm@xmission.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=hpa@zytor.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=tglx@linutronix.de \
    --cc=toshi.kani@hpe.com \
    --cc=vgoyal@redhat.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xlpang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®