All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: Anthony Perard <anthony.perard@citrix.com>,
	Diana Crisan <dcrisan@flexiant.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: Early ACPI events prevent subsequent ACPI functionality on xen 4.3 + HVM domU
Date: Tue, 21 May 2013 16:23:00 +0100	[thread overview]
Message-ID: <519B9154.2090709@eu.citrix.com> (raw)
In-Reply-To: <090E19BC911ECE1F10940F48@Ximines.local>

On 05/21/2013 04:16 PM, Alex Bligh wrote:
> George,
>
> --On 21 May 2013 14:39:55 +0100 George Dunlap
> <George.Dunlap@eu.citrix.com> wrote:
>
>> So this appears to be an xl toolstack thing.  I managed to reproduce
>> your results using "xl shutdown -F [domain]"; but if you then do "xl
>> trigger [domian] power", the domain shuts down as normal.
>
> OK. But doesn't the power thing yank the power rather than send a
> clean shutdown?

No -- if you push the button just once on most modern hardware it will 
send an ACPI "poweroff" event that the OS handles gracefully.  That's 
what gets sent when you do "xl trigger [domain] power".  If the OS 
ignores it (either on real hardware or virtual hardware) nothing 
happens.  On real hardware you have to then hold down the button for 5 
seconds for a hard-shutdown, with xl you have to do "xl destroy".

> We are using libxl here (admittedly having looked carefully at
> the xl code for guidance) and get the same problem.

The relevant xl code is here:

     rc=libxl_domain_shutdown(ctx, domid);
     if (rc == ERROR_NOPARAVIRT) {
         if (fallback_trigger) {
             fprintf(stderr, "PV control interface not available:"
                     " sending ACPI power button event.\n");
             rc = libxl_send_trigger(ctx, domid, LIBXL_TRIGGER_POWER, 0);
         } else {
             fprintf(stderr, "PV control interface not available:"
                     " external graceful shutdown not possible.\n");
             fprintf(stderr, "Use \"-F\" to fallback to ACPI power 
event.\n");
         }
     }

It looks like libxl_domain_shutdown() will only use the PV shutdown 
method.  If that method is not available, then it will call 
libxl_send_trigger().

What does your code do?  Does it call libxl_domain_shutdown(), or 
libxl_send_trigger() (or one then the other, like xl)?

  -George

  reply	other threads:[~2013-05-21 15:23 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1052133728.8634452.1368537175372.JavaMail.root@zimbra002>
2013-05-14 13:13 ` Early ACPI events prevent subsequent ACPI functionality on xen 4.3 + HVM domU Diana Crisan
2013-05-17 17:35   ` Ian Campbell
2013-05-18  9:55     ` Alex Bligh
2013-05-21 13:39       ` George Dunlap
2013-05-21 14:16         ` George Dunlap
2013-05-21 14:20           ` Ian Campbell
2013-05-21 14:34             ` George Dunlap
2013-05-21 14:42               ` Ian Campbell
2013-05-21 16:51                 ` Dave Scott
2013-05-21 19:58                   ` Ian Campbell
2013-05-21 15:17               ` Alex Bligh
2013-05-21 15:36                 ` George Dunlap
2013-05-21 15:51                   ` George Dunlap
2013-05-21 16:22                     ` Alex Bligh
2013-05-21 16:45                     ` Konrad Rzeszutek Wilk
2013-05-21 17:48                       ` Alex Bligh
2013-05-21 19:33                         ` Konrad Rzeszutek Wilk
2013-05-21 19:46                           ` Alex Bligh
2013-05-22  9:57                           ` Ian Campbell
2013-05-22  9:21                         ` George Dunlap
2013-05-22 10:08                           ` Alex Bligh
2013-05-22 10:45                             ` Diana Crisan
2013-05-22 10:55                               ` George Dunlap
2013-05-22 11:16                                 ` Alex Bligh
2013-05-22 11:50                                   ` George Dunlap
2013-05-22 14:43                                     ` Konrad Rzeszutek Wilk
2013-11-06 16:05                                       ` Konrad Rzeszutek Wilk
2013-11-06 16:14                                         ` Ian Campbell
2013-11-06 20:16                                           ` Konrad Rzeszutek Wilk
2013-11-07 11:24                                             ` Ian Campbell
2013-11-08 14:27                                               ` Konrad Rzeszutek Wilk
2013-11-06 16:18                                         ` Jan Beulich
2013-05-21 15:16         ` Alex Bligh
2013-05-21 15:23           ` George Dunlap [this message]
2013-05-21 15:59             ` Alex Bligh
2013-05-21 16:09               ` George Dunlap
2013-05-21 16:25                 ` Alex Bligh
2013-05-21 16:48                 ` Diana Crisan
2013-05-21 17:31                 ` Sander Eikelenboom
2013-06-27 14:04                   ` George Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519B9154.2090709@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=alex@alex.org.uk \
    --cc=anthony.perard@citrix.com \
    --cc=dcrisan@flexiant.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.