Date: Mon, 21 Oct 2013 15:20:01 GMT From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com> To: freebsd-xen@FreeBSD.org Subject: Re: kern/171118: [xen] FreeBSD XENHVM guest doesn't shutdown cleanly Message-ID: <201310211520.r9LFK12g076844@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@citrix.com> To: <bug-followup@FreeBSD.org>, <feld@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) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310211520.r9LFK12g076844>