From: Dario Faggioli <dario.faggioli@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Ben Guthro <ben@guthro.net>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xen: add a 'acpi_fake_s3' boot command line parameter
Date: Mon, 22 Jun 2015 14:39:13 +0200 [thread overview]
Message-ID: <1434976753.25170.75.camel@citrix.com> (raw)
In-Reply-To: <558812450200007800087786@mail.emea.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 2146 bytes --]
On Mon, 2015-06-22 at 12:48 +0100, Jan Beulich wrote:
> >>> On 22.06.15 at 13:28, <dario.faggioli@citrix.com> wrote:
> > --- a/xen/arch/x86/acpi/power.c
> > +++ b/xen/arch/x86/acpi/power.c
> > @@ -33,6 +33,9 @@
> >
> > uint32_t system_reset_counter = 1;
> >
> > +static bool_t __read_mostly fake_s3 = 0;
> > +boolean_param("acpi_fake_s3", fake_s3);
> > +
> > static char __initdata opt_acpi_sleep[20];
> > string_param("acpi_sleep", opt_acpi_sleep);
> >
> > @@ -177,7 +180,8 @@ static int enter_state(u32 state)
> > switch ( state )
> > {
> > case ACPI_STATE_S3:
> > - do_suspend_lowlevel();
> > + if ( likely(!fake_s3) )
> > + do_suspend_lowlevel();
> > system_reset_counter++;
> > error = tboot_s3_resume();
> > break;
>
> The change is so simple that, considering it's for debugging purposes
> only, I don't see why people needing to debug this code couldn't
> apply it themselves when needed.
>
When Ben sent this out some time ago for the first time, one purpose was
also using it for making it possible to test S3 in osstest, even on
hardware that does not support (properly) that feature.
I've also done some work in that direction (I did write a test case),
and the point is probably still valid. However, this patch alone can't
make the above happen by itself, as on such hardware, it's not possible
to echo 'mem' in /sys/power/state, and hence trigger the (fake) suspend
(or at least that is my experience).
So this patch would still be a step in the right direction , but
together with something that allows us to trigger the suspensions from
Dom0, bypassing Linux's checks, which is something I haven't
investigated.
> Imo, if to be considered at all, it
> should be made !NDEBUG dependent.
>
Ok, I'll make that so when/if respinning.
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2015-06-22 12:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 11:28 [PATCH] xen: add a 'acpi_fake_s3' boot command line parameter Dario Faggioli
2015-06-22 11:48 ` Jan Beulich
2015-06-22 12:39 ` Dario Faggioli [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=1434976753.25170.75.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ben@guthro.net \
--cc=xen-devel@lists.xenproject.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.