direct-io.hg

changeset 13872:1502ba048b73

[IA64] Fix PAL_HALT for paravirtualized domains

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>
author awilliam@xenbuild2.aw
date Sun Feb 04 11:36:12 2007 -0700 (2007-02-04)
parents a1017acc8578
children 5558f396e068
files linux-2.6-xen-sparse/arch/ia64/kernel/setup.c xen/arch/ia64/xen/fw_emul.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Sun Feb 04 11:28:54 2007 -0700
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Sun Feb 04 11:36:12 2007 -0700
     1.3 @@ -95,6 +95,13 @@ xen_panic_event(struct notifier_block *t
     1.4  static struct notifier_block xen_panic_block = {
     1.5  	xen_panic_event, NULL, 0 /* try to go last */
     1.6  };
     1.7 +
     1.8 +void xen_pm_power_off(void)
     1.9 +{
    1.10 +	printk("%s called\n", __FUNCTION__);
    1.11 +	local_irq_disable();
    1.12 +	HYPERVISOR_shutdown(SHUTDOWN_poweroff);
    1.13 +}
    1.14  #endif
    1.15  
    1.16  extern void ia64_setup_printk_clock(void);
    1.17 @@ -456,6 +463,7 @@ setup_arch (char **cmdline_p)
    1.18  		/* Register a call for panic conditions. */
    1.19  		atomic_notifier_chain_register(&panic_notifier_list,
    1.20  		                               &xen_panic_block);
    1.21 +		pm_power_off = xen_pm_power_off;
    1.22  	}
    1.23  #endif
    1.24  
     2.1 --- a/xen/arch/ia64/xen/fw_emul.c	Sun Feb 04 11:28:54 2007 -0700
     2.2 +++ b/xen/arch/ia64/xen/fw_emul.c	Sun Feb 04 11:36:12 2007 -0700
     2.3 @@ -605,9 +605,11 @@ xen_pal_emulator(unsigned long index, u6
     2.4  			printk ("Domain0 halts the machine\n");
     2.5  			console_start_sync();
     2.6  			(*efi.reset_system)(EFI_RESET_SHUTDOWN,0,0,NULL);
     2.7 +		} else {
     2.8 +			set_bit(_VCPUF_down, &current->vcpu_flags);
     2.9 +			vcpu_sleep_nosync(current);
    2.10 +			status = PAL_STATUS_SUCCESS;
    2.11  		}
    2.12 -		else
    2.13 -			domain_shutdown(current->domain, SHUTDOWN_poweroff);
    2.14  		break;
    2.15  	    case PAL_HALT_LIGHT:
    2.16  		if (VMX_DOMAIN(current)) {