machine_halt() stops the vcpus, but no longer destroys the domain.
This should be more in-line with the behavior on native hardware.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
static struct notifier_block xen_panic_block = {
xen_panic_event, NULL, 0 /* try to go last */
};
+
+void xen_pm_power_off(void)
+{
+ printk("%s called\n", __FUNCTION__);
+ local_irq_disable();
+ HYPERVISOR_shutdown(SHUTDOWN_poweroff);
+}
#endif
extern void ia64_setup_printk_clock(void);
/* Register a call for panic conditions. */
atomic_notifier_chain_register(&panic_notifier_list,
&xen_panic_block);
+ pm_power_off = xen_pm_power_off;
}
#endif
printk ("Domain0 halts the machine\n");
console_start_sync();
(*efi.reset_system)(EFI_RESET_SHUTDOWN,0,0,NULL);
+ } else {
+ set_bit(_VCPUF_down, ¤t->vcpu_flags);
+ vcpu_sleep_nosync(current);
+ status = PAL_STATUS_SUCCESS;
}
- else
- domain_shutdown(current->domain, SHUTDOWN_poweroff);
break;
case PAL_HALT_LIGHT:
if (VMX_DOMAIN(current)) {