[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Early ACPI events prevent subsequent ACPI functionality on xen 4.3 + HVM domU

On Tue, May 21, 2013 at 06:48:16PM +0100, Alex Bligh wrote:
> Konrad,
> --On 21 May 2013 12:45:31 -0400 Konrad Rzeszutek Wilk
> <konrad.wilk@xxxxxxxxxx> wrote:
> >For the emulated path I am not entirely sure how the ACPI path works
> >when a guest hasn't initialized its ACPI machinery. I would think the
> >ACPI SCI would be triggered, but it might not be since the ACPI AML
> >has no way of running (as the OS hasn't even started reading it). In
> >which case the emulated path ought to use a fallback, whatever that is.
> >But I am not sure if there is a fallback except "yanking the power" -
> >which I think is what normal machines do if you hold the power off button
> >for more than 3 seconds.
> The problem isn't that a shutdown doesn't work if there are no drivers
> for it. The problem is that if you issue a shutdown when there are
> no drivers, then later issue a shutdown when there are drivers, it
> still doesn't work.

OK, but we should be able to fix this in Linux by doing something along
these lines (not compile tested):

diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 412b96c..34f967f 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -194,7 +194,6 @@ static void do_reboot(void)
        shutting_down = SHUTDOWN_POWEROFF; /* ? */
 static void shutdown_handler(struct xenbus_watch *watch,
                             const char **vec, unsigned int len)
@@ -252,6 +251,10 @@ static void shutdown_handler(struct xenbus_watch *watch,
+static void check_shutdown_handler(void)
+        shutdown_handler(NULL, NULL, 0);
 static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
                          unsigned int len)
@@ -310,7 +313,7 @@ static int setup_shutdown_watcher(void)
                return err;
+       check_shutdown_handler();
        return 0;
> Somewhat to my surprise we are using the PV/PVHVM route not the ACPI
> route (libxl_domain_shutdown / xl shutdown) so the subject line would
> appear to be inaccurate.
> The second problem is that ACPI shutdown appears not to work reliably
> either (whenever issued).

Right and that one would require some more investigation as I think it 
works as it would work on baremetal. Meaning if you press the 'shutdown'
button and only BIOS is running it will ignore you. This would
be similar to the 'xl trigger' call that hopefully invokes the ACPI signal.

You have to hold it for 5 seconds or so for the BIOS to do anything
about it.

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.