All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Vaughan Cao <vaughan.cao@oracle.com>
Cc: jeremy@goop.org, xen-devel@lists.xensource.com, x86@kernel.org,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, mingo@redhat.com,
	hpa@zytor.com, tglx@linutronix.de
Subject: Re: [PATCH] xen: initialize xen panic handler for PVHVM
Date: Fri, 16 Aug 2013 08:43:28 -0400	[thread overview]
Message-ID: <20130816124327.GC10190@konrad-lan.dumpdata.com> (raw)
In-Reply-To: <1376640656-32381-1-git-send-email-vaughan.cao@oracle.com>

On Fri, Aug 16, 2013 at 04:10:56PM +0800, Vaughan Cao wrote:
> kernel use callback linked in panic_notifier_list to notice others when panic
> happens.
> NORET_TYPE void panic(const char * fmt, ...){
>     ...
>     atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
> }
> When xen aware this, it will call xen_reboot(SHUTDOWN_crash) to send out an
  ^^^^^^^^^^^^^^^^^^^-> "When Xen becomes aware of this"

> event with reason code - SHUTDOWN_crash.
> xen_panic_handler_init() is defined to register on panic_notifier_list but
> we only call it in xen_arch_setup which only be called by pvm, this patch is
                                          ^^^^^^^-> "is only"
>  necessary for pvhvm.

Could you tell me what has been happening without this patch?

Thank you.

> 
> Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
> ---
>  arch/x86/xen/enlighten.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 4aec5ed..53e5726 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1713,6 +1713,8 @@ static void __init xen_hvm_guest_init(void)
>  
>  	xen_hvm_init_shared_info();
>  
> +	xen_panic_handler_init();
> +
>  	if (xen_feature(XENFEAT_hvm_callback_vector))
>  		xen_have_vector_callback = 1;
>  	xen_hvm_smp_init();
> -- 
> 1.7.11.7
> 

WARNING: multiple messages have this Message-ID (diff)
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Vaughan Cao <vaughan.cao@oracle.com>
Cc: jeremy@goop.org, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, x86@kernel.org, xen-devel@lists.xensource.com,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen: initialize xen panic handler for PVHVM
Date: Fri, 16 Aug 2013 08:43:28 -0400	[thread overview]
Message-ID: <20130816124327.GC10190@konrad-lan.dumpdata.com> (raw)
In-Reply-To: <1376640656-32381-1-git-send-email-vaughan.cao@oracle.com>

On Fri, Aug 16, 2013 at 04:10:56PM +0800, Vaughan Cao wrote:
> kernel use callback linked in panic_notifier_list to notice others when panic
> happens.
> NORET_TYPE void panic(const char * fmt, ...){
>     ...
>     atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
> }
> When xen aware this, it will call xen_reboot(SHUTDOWN_crash) to send out an
  ^^^^^^^^^^^^^^^^^^^-> "When Xen becomes aware of this"

> event with reason code - SHUTDOWN_crash.
> xen_panic_handler_init() is defined to register on panic_notifier_list but
> we only call it in xen_arch_setup which only be called by pvm, this patch is
                                          ^^^^^^^-> "is only"
>  necessary for pvhvm.

Could you tell me what has been happening without this patch?

Thank you.

> 
> Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
> ---
>  arch/x86/xen/enlighten.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 4aec5ed..53e5726 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1713,6 +1713,8 @@ static void __init xen_hvm_guest_init(void)
>  
>  	xen_hvm_init_shared_info();
>  
> +	xen_panic_handler_init();
> +
>  	if (xen_feature(XENFEAT_hvm_callback_vector))
>  		xen_have_vector_callback = 1;
>  	xen_hvm_smp_init();
> -- 
> 1.7.11.7
> 

  reply	other threads:[~2013-08-16 12:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16  8:10 [PATCH] xen: initialize xen panic handler for PVHVM Vaughan Cao
2013-08-16 12:43 ` Konrad Rzeszutek Wilk [this message]
2013-08-16 12:43   ` Konrad Rzeszutek Wilk
2013-08-19  2:38   ` vaughan
2013-08-19  2:38     ` vaughan
2013-08-19  2:38     ` vaughan
2013-08-19  6:18   ` [Xen-devel] " Joe Jin
2013-08-19  6:18   ` Joe Jin
2013-08-20 19:39     ` Konrad Rzeszutek Wilk
2013-08-20 19:39       ` Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2013-08-16  8:10 Vaughan Cao

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=20130816124327.GC10190@konrad-lan.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=vaughan.cao@oracle.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.