From 97a7c0c266c59380eac2552ba211bd0983710d61 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 7 Apr 2006 13:40:22 +0100 Subject: [PATCH] Power down an x86 system directly within domain0 rather than executing a shutdown hypercall. Domain0 is able to execute ACPI power-off code. Signed-off-by: Harry Butterworth --- linux-2.6-xen-sparse/drivers/xen/core/reboot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c index ba0b9b9112..7a3d2cc39d 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c @@ -59,6 +59,10 @@ void machine_power_off(void) { /* We really want to get pending console data out before we die. */ xencons_force_flush(); +#if defined(__i386__) || defined(__x86_64__) + if (pm_power_off) + pm_power_off(); +#endif HYPERVISOR_shutdown(SHUTDOWN_poweroff); } -- 2.39.5