From: Ian Campbell Subject: Re: Early ACPI events prevent subsequent ACPI functionality on xen 4.3 + HVM domU Date: Wed, 6 Nov 2013 16:14:20 +0000 Message-ID: <1383754460.26213.133.camel@kazak.uk.xensource.com> References: <519B9801.3080901@eu.citrix.com> <20130521164531.GE3669@phenom.dumpdata.com> <6D7B8289F0F8A65C8C2A25C7@Ximines.local> <1809930721.71216.1369219520131.JavaMail.root@flexiant.com> <519CA407.7000609@eu.citrix.com> <8AFD571E8A65CC3529A5604A@Ximines.local> <519CB11A.5030907@eu.citrix.com> <20130522144301.GB8162@phenom.dumpdata.com> <20131106160508.GA8490@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131106160508.GA8490@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: Dave Scott , George Dunlap , xen-devel@lists.xen.org, Paul Durrant , Stefano Stabellini , Alex Bligh , Anthony Perard , Diana Crisan List-Id: xen-devel@lists.xenproject.org On Wed, 2013-11-06 at 11:05 -0500, Konrad Rzeszutek Wilk wrote: > From f53c1f691f726a9d72ad11be56f84389c3f3d7b0 Mon Sep 17 00:00:00 2001 > From: Konrad Rzeszutek Wilk > Date: Wed, 6 Nov 2013 10:57:56 -0500 > Subject: [PATCH] xen/manage: Poweroff forcefully if user-space is not yet up. > > The user can launch the guest in this sequence: > > xl create -p /vm.cfg [launch, but pause it] > xl shutdown latest [sets control/shutdown=poweroff] > xl unpause latest > xl console latest [and see that the guest has completlty "completely" > ignored the shutdown request] > > In reality the guest hasn't ignored it. It registers a watch > and gets a notification that there is value. It then calls > the shutdown_handler which ends up calling orderly_shutdown. > > Unfortunately that is so early in the bootup that there > are no user-space. Which means that the orderly_shutdown fails. > But since the force flag was set to false it continues on without > reporting. > > We check if the system is still in the booting stage and if so > enable the force option (which will shutdown in early bootup > process). If in normal running case we don't force it. > > Fixes-Bug: http://bugs.xenproject.org/xen/bug/6 > Reported-by: Alex Bligh > Signed-off-by: Konrad Rzeszutek Wilk > --- > drivers/xen/manage.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c > index 624e8dc..fe1c0a6 100644 > --- a/drivers/xen/manage.c > +++ b/drivers/xen/manage.c > @@ -185,7 +185,7 @@ struct shutdown_handler { > static void do_poweroff(void) > { > shutting_down = SHUTDOWN_POWEROFF; > - orderly_poweroff(false); > + orderly_poweroff(system_state != SYSTEM_RUNNING ? true : false); Does this DTRT for systems in SYSTEM_{HALTED,POWEROFF}? I suppose under those circumstances forcing is the desired action, insn't it Acked-by: Ian Campbell Ian.