[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 13/22] vixen: Use SCHEDOP_shutdown to shutdown the machine
From: Jan H. Schönherr <jschoenh@xxxxxxxxx> While the hwdom_shutdown() is able to reboot the system, it fails to properly power it off. With SCHEDOP_shutdown, we delegate the problem. Signed-off-by: Jan H. Schönherr <jschoenh@xxxxxxxxx> Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx> --- xen/common/domain.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index b4d679e..ede377c 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -42,6 +42,7 @@ #include <xen/trace.h> #include <xen/tmem.h> #include <asm/setup.h> +#include <asm/guest/vixen.h> /* Linux config option: propageted to domain0 */ /* xen_processor_pmbits: xen control Cx, Px, ... */ @@ -693,6 +694,17 @@ void __domain_crash_synchronous(void) } +static void vixen_shutdown(u8 reason) +{ + struct sched_shutdown sched_shutdown = { .reason = reason }; + + if (!opt_noreboot) + HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown); + + /* Fallback, in case the hypercall fails */ + hwdom_shutdown(reason); +} + void domain_shutdown(struct domain *d, u8 reason) { struct vcpu *v; @@ -703,6 +715,8 @@ void domain_shutdown(struct domain *d, u8 reason) d->shutdown_code = reason; reason = d->shutdown_code; + if ( is_vixen() ) + vixen_shutdown(reason); if ( is_hardware_domain(d) ) hwdom_shutdown(reason); -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |