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
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
necessary for pvhvm.
Signed-off-by: Vaughan Cao <vaughan.cao at 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
Konrad Rzeszutek Wilk
2013-Aug-16 12:43 UTC
[PATCH] xen: initialize xen panic handler for PVHVM
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 at 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 >
Maybe Matching Threads
- [PATCH] xen: initialize xen panic handler for PVHVM
- [PATCH] xen: initialize xen panic handler for PVHVM
- [PATCH] xen pvhvm: do not remap pirqs onto evtchns if !xen_have_vector_callback
- HVM guests and pvlocks not working as expected
- [RFC PATCH 1/1] mshyperv: fix recognition of Hyper-V guest crash MSR's