From: George Dunlap <george.dunlap@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Ben Guthro" <benjamin.guthro@citrix.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"George Dunlap" <george.dunlap@citrix.com>,
"Dario Faggioli" <dfaggioli@suse.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Ian Jackson" <ian.jackson@citrix.com>
Subject: [PATCH] xen: Add fake_s3 command-line option for testing
Date: Mon, 21 May 2018 15:16:00 +0100 [thread overview]
Message-ID: <20180521141600.5516-1-george.dunlap@citrix.com> (raw)
Most server-class hardware doesn't support ACPI S3 suspend; but most
bugs we'll run across won't need actual S3 to trigger. Add a
command-line parameter for a "fake" S3, which will do everything
during suspend/restore except actually calling into the ACPI S3
handler.
Signed-off-by: Ben Guthro <benjamin.guthro@citrix.com>
Signed-off-by: George Dunlap <george.dunlap@citrix.com>
---
This was originally posted in 2013, but never actually checked in.
I've removed an extraneous line, and changed the underscore in the
option into a dash (as Jan seems to prefer).
Compile-tested only.
If we want osstest to be able to test this functionality it should
probably be backported.
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Dario Faggioli <dfaggioli@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
xen/arch/x86/acpi/power.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c
index a704c7c340..566cbc38b3 100644
--- 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("fake-s3", fake_s3);
+
static char __initdata opt_acpi_sleep[20];
string_param("acpi_sleep", opt_acpi_sleep);
@@ -222,7 +225,8 @@ static int enter_state(u32 state)
switch ( state )
{
case ACPI_STATE_S3:
- do_suspend_lowlevel();
+ if ( !fake_s3 )
+ do_suspend_lowlevel();
system_reset_counter++;
error = tboot_s3_resume();
break;
--
2.17.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2018-05-21 14:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 14:16 George Dunlap [this message]
2018-05-21 14:28 ` [PATCH] xen: Add fake_s3 command-line option for testing Andrew Cooper
2018-05-21 15:33 ` George Dunlap
2018-05-22 7:47 ` Dario Faggioli
2018-05-22 10:53 ` Jan Beulich
2018-05-22 10:51 ` Jan Beulich
2018-05-22 10:55 ` Andrew Cooper
2018-05-22 11:21 ` George Dunlap
2018-05-22 11:44 ` Jan Beulich
2018-05-22 13:21 ` 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=20180521141600.5516-1-george.dunlap@citrix.com \
--to=george.dunlap@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=benjamin.guthro@citrix.com \
--cc=dfaggioli@suse.com \
--cc=ian.jackson@citrix.com \
--cc=jbeulich@suse.com \
--cc=marmarek@invisiblethingslab.com \
--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 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).