[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-ia64-devel] [Patch] fix pal halt of para domain
Hi, Alex and all >> machine_halt() isn't supposed to power off the system. The >>processors should be left spinning and the domain will be halted, but >>still in place. machine_power_off() should certainly shutdown the >>domain, but that's where the pm_power_off hook is useful. >> >I concerned that someuser use "halt" command instead of "shutdown -h now". >But you are right, I update it. I update it with pm_power_off hook. Note: "halt" command may be not able to destroy guest. machine_halt() isn't support power off of the system. So we need to destroy guest if we want to power off it completely, when we halt it. This is the same behavior as a native machine. Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx> --- diff -r 0df9dc2f1d03 linux-2.6-xen-sparse/arch/ia64/kernel/setup.c --- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c Thu Feb 01 13:54:26 2007 -0700 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c Sun Feb 04 07:54:48 2007 +0900 @@ -95,6 +95,12 @@ static struct notifier_block xen_panic_b 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); @@ -456,6 +462,7 @@ setup_arch (char **cmdline_p) /* Register a call for panic conditions. */ atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block); + pm_power_off = xen_pm_power_off; } #endif diff -r 0df9dc2f1d03 xen/arch/ia64/xen/fw_emul.c --- a/xen/arch/ia64/xen/fw_emul.c Thu Feb 01 13:54:26 2007 -0700 +++ b/xen/arch/ia64/xen/fw_emul.c Sun Feb 04 07:54:48 2007 +0900 @@ -605,9 +605,11 @@ xen_pal_emulator(unsigned long index, u6 printk ("Domain0 halts the machine\n"); console_start_sync(); (*efi.reset_system)(EFI_RESET_SHUTDOWN,0,0,NULL); - } - else - domain_shutdown(current->domain, SHUTDOWN_poweroff); + }else{ + set_bit(_VCPUF_down, ¤t->vcpu_flags); + vcpu_sleep_nosync(current); + status = PAL_STATUS_SUCCESS; + } break; case PAL_HALT_LIGHT: if (VMX_DOMAIN(current)) { Best Regards, Akio Takebe Attachment:
domU_pal_halt_pm_poweroff.patch _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |