From: Vaughan Cao Date: Fri, 16 Aug 2013 08:10:56 +0000 (+0800) Subject: xen/pvhvm: Initialize xen panic handler for PVHVM guests X-Git-Tag: v3.12-rc1~144^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=669b0ae961e87c824233475e987b2d39996d4849;p=pandora-kernel.git xen/pvhvm: Initialize xen panic handler for PVHVM guests 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 becomes aware of 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 PV, this patch is necessary for PVHVM. Without this patch, setting 'on_crash=coredump-restart' in PVHVM guest config file won't lead a vmcore to be generate when the guest panics. It can be reproduced with 'echo c > /proc/sysrq-trigger'. Signed-off-by: Vaughan Cao Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Joe Jin --- Reading git-diff-tree failed