linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Anchal Agarwal <anchalag@amazon.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Singh, Balbir" <sblbir@amazon.com>,
	fllinden@amazon.com,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Erik Kaneda <erik.kaneda@intel.com>,
	Bob Moore <robert.moore@intel.com>
Subject: Re: [PATCH] ACPICA: Enable sleep button on ACPI legacy wake
Date: Wed, 15 Jan 2020 23:57:27 +0100	[thread overview]
Message-ID: <CAJZ5v0ijf5gEBXiMvbp-tas7=HwrDSi3BpLEVYHY458su5EUiQ@mail.gmail.com> (raw)
In-Reply-To: <20200115185832.GA31684@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com>

On Wed, Jan 15, 2020 at 7:58 PM Anchal Agarwal <anchalag@amazon.com> wrote:
>
> On Wed, Jan 15, 2020 at 11:24:47AM +0100, Rafael J. Wysocki wrote:
> > On Thursday, January 2, 2020 11:39:19 PM CET Anchal Agarwal wrote:
> > > On Thu, Dec 12, 2019 at 11:10:32PM +0100, Rafael J. Wysocki wrote:
> > > > On Monday, October 29, 2018 6:52:16 PM CET Anchal Agarwal wrote:
> > > > > Currently we do not see sleep_enable bit set after guest resumes
> > > > > from hibernation. Hibernation is triggered in guest on receiving
> > > > > a sleep trigger from the hypervisor(S4 state). We see that power
> > > > > button is enabled on wake up from S4 state however sleep button
> > > > > isn't.
> > > >
> > > > I'm not against this change in principle, although it may change behavior
> > > > in a somewhat unexpected way on some systems.
> > > >
> > > Apologies for late response, I was out on vacation.
> > > Can you please elaborate more on that?
> >
> > See below.
> >
> > > > > This causes subsequent invocation of sleep state to fail
> > > > > in the guest.
> > > >
> > > > However, can you explain this in a bit more detail?
> > > >
> > > I can explain this for my particular case, however, any code path going
> > > through acpi_hw_legacy_wake path will not have sleep button enabled. Why
> > > is only power button event enabled and not sleep here?
> >
> > Good question and related to the potentially unexpected behavior part.
> >
> > Presumably, on some systems the sleep button could not be enabled
> > automatically as it triggered another suspend right away after that.
> >
> > That's speculation, though.
> >
> > > In my case, I am using sleep button event to generate S4 state
> > > which causes guest VM running on xen to hibernate.
> >
> > Usually, however, the sleep button is used to trigger transitions into S3
> > (or suspend-to-idle on systems that support it).
> >
> > > I have found
> > > in my debugging process that after first resume when kernel goes
> > > through this code path, sleep button event is not enabled and
> > > when hypervisor try to generate sci interrupt, its not received in
> > > the guest since this path does not enable sleep event.
> >
> > OK
> >
> > So the patch can be applied AFAICS, but if it is reported to cause problems to
> > happen, it will need to be reverted.
> >
> > Please resend the patch with a proper CC list (including Bob, Erik, the ACPICA
> > devel list etc).
> >
> > Thanks!
> Sure can I add your Reviewed-by or Acked-by?

I'll be applying this eventually anyway, so why?

      reply	other threads:[~2020-01-15 22:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191101212319.1FFC440EB1@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com>
     [not found] ` <CF6A88132359CE47947DB4C6E1709ED53C66675F@ORSMSX122.amr.corp.intel.com>
2019-11-01 22:26   ` [PATCH] ACPICA: Enable sleep button on ACPI legacy wake Agarwal, Anchal
2019-11-04 17:58     ` Agarwal, Anchal
2019-11-08 17:56       ` Anchal Agarwal
2019-12-12 22:10 ` Rafael J. Wysocki
2020-01-02 22:39   ` Anchal Agarwal
2020-01-15 10:24     ` Rafael J. Wysocki
2020-01-15 18:58       ` Anchal Agarwal
2020-01-15 22:57         ` Rafael J. Wysocki [this message]

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='CAJZ5v0ijf5gEBXiMvbp-tas7=HwrDSi3BpLEVYHY458su5EUiQ@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=anchalag@amazon.com \
    --cc=erik.kaneda@intel.com \
    --cc=fllinden@amazon.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=sblbir@amazon.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).