Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204775
b: refs/heads/master
c: f09f6d1
h: refs/heads/master
i:
  204773: cf155fd
  204771: a880453
  204767: c0e3599
v: v3
  • Loading branch information
Donald Dutile authored and Jeremy Fitzhardinge committed Aug 4, 2010
1 parent 6885ca9 commit 43ad2fb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c06ee78d73fd24e8d8a65f16380f6a0551107e1b
refs/heads/master: f09f6d194d85043e0eb105a577e7ad6d8170ab66
20 changes: 20 additions & 0 deletions trunk/arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/xen/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ void __init xen_arch_setup(void)
struct physdev_set_iopl set_iopl;
int rc;

xen_panic_handler_init();

HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/xen/xen-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,6 @@ void xen_sysret32(void);
void xen_sysret64(void);
void xen_adjust_exception_frame(void);

extern int xen_panic_handler_init(void);

#endif /* XEN_OPS_H */

0 comments on commit 43ad2fb

Please sign in to comment.