kern/171118: [xen] FreeBSD XENHVM guest doesn't shutdown cleanly
Roger Pau Monné
roger.pau at citrix.com
Mon Oct 21 15:20:02 UTC 2013
The following reply was made to PR kern/171118; it has been noted by GNATS.
From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau at citrix.com>
To: <bug-followup at FreeBSD.org>, <feld at feld.me>
Cc:
Subject: Re: kern/171118: [xen] FreeBSD XENHVM guest doesn't shutdown
cleanly
Date: Mon, 21 Oct 2013 16:18:34 +0100
When using libxl the event sent is a "poweroff", but I guess XenServer
toolstack is sending a "halt" event instead (which libxl doesn't use
for anything). The following patch wires the "halt" event handler to
the "poweroff" handler and removes the now unused "halt" handler.
I'm currently on a trip, so I haven't been able to test the patch
(not even compile tested).
---
diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c
index 35c923d..78894ba 100644
--- a/sys/dev/xen/control/control.c
+++ b/sys/dev/xen/control/control.c
@@ -158,7 +158,6 @@ static xctrl_shutdown_handler_t xctrl_poweroff;
static xctrl_shutdown_handler_t xctrl_reboot;
static xctrl_shutdown_handler_t xctrl_suspend;
static xctrl_shutdown_handler_t xctrl_crash;
-static xctrl_shutdown_handler_t xctrl_halt;
/*-------------------------- Private Data Structures -------------------------*/
/** Element type for lookup table of event name to handler. */
@@ -173,7 +172,7 @@ static const struct xctrl_shutdown_reason xctrl_shutdown_reasons[] = {
{ "reboot", xctrl_reboot },
{ "suspend", xctrl_suspend },
{ "crash", xctrl_crash },
- { "halt", xctrl_halt },
+ { "halt", xctrl_poweroff },
};
struct xctrl_softc {
@@ -427,12 +426,6 @@ xctrl_crash()
}
static void
-xctrl_halt()
-{
- shutdown_nice(RB_HALT);
-}
-
-static void
xen_pv_shutdown_final(void *arg, int howto)
{
/*
More information about the freebsd-xen
mailing list