return ret;
}
+static inline int
+HYPERVISOR_crash(
+ void)
+{
+ int ret;
+ unsigned long ign1;
+ __asm__ __volatile__ (
+ TRAP_INSTR
+ : "=a" (ret), "=b" (ign1)
+ : "0" (__HYPERVISOR_sched_op),
+ "1" (SCHEDOP_shutdown | (SHUTDOWN_crash << SCHEDOP_reasonshift))
+ : "memory" );
+
+ return ret;
+}
+
static inline long
HYPERVISOR_set_timer_op(
u64 timeout)
#include <asm/shadow.h>
#include <public/dom0_ops.h>
#include <asm/domain_page.h>
+#include <public/io/domain_controller.h>
/* Both these structures are protected by the domlist_lock. */
rwlock_t domlist_lock = RW_LOCK_UNLOCKED;
}
}
+ if ( reason == SHUTDOWN_crash )
+ domain_crash(); /* we will not return */
+
current->shutdown_code = reason;
set_bit(DF_SHUTDOWN, ¤t->flags);
#define SHUTDOWN_poweroff 0 /* Domain exited normally. Clean up and kill. */
#define SHUTDOWN_reboot 1 /* Clean up, kill, and then restart. */
#define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */
-
+#define SHUTDOWN_crash 3 /* Tell controler we've crashed. */
/*
* CONTROLLER MESSAGING INTERFACE.