|
@@ -1040,6 +1040,26 @@ static void xen_crash_shutdown(struct pt_regs *regs)
|
|
|
xen_reboot(SHUTDOWN_crash);
|
|
|
}
|
|
|
|
|
|
+static int
|
|
|
+xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
|
|
|
+{
|
|
|
+ struct sched_shutdown r = { .reason = SHUTDOWN_crash};
|
|
|
+
|
|
|
+ if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r))
|
|
|
+ BUG();
|
|
|
+ return NOTIFY_DONE;
|
|
|
+}
|
|
|
+
|
|
|
+static struct notifier_block xen_panic_block = {
|
|
|
+ .notifier_call= xen_panic_event,
|
|
|
+};
|
|
|
+
|
|
|
+int xen_panic_handler_init(void)
|
|
|
+{
|
|
|
+ atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
static const struct machine_ops __initdata xen_machine_ops = {
|
|
|
.restart = xen_restart,
|
|
|
.halt = xen_machine_halt,
|