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.gut...@citrix.com> Signed-off-by: George Dunlap <george.dun...@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.jack...@citrix.com> CC: Dario Faggioli <dfaggi...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> CC: Jan Beulich <jbeul...@suse.com> CC: Marek Marczykowski-Górecki <marma...@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