xen: Add fake_s3 command-line option for testing
PATCH 1/1 xen: Add fake_s3 command-line option for testing
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.
---
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.
--- xen/arch/x86/acpi/power.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
xen/arch/x86/acpi/power.c +5 -1
@@ -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 ;
Signature · 7 lines
2.17.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 16 lines · George Dunlap
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 <[email protected]>Signed-off-by George Dunlap <[email protected]>---
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.
Quoted 8 lines
If we want osstest to be able to test this functionality it should probably be backported.
CC Ian Jackson <[email protected]>CC Dario Faggioli <[email protected]>CC Andrew Cooper <[email protected]>CC Jan Beulich <[email protected]>CC Marek Marczykowski-Górecki <[email protected]>
bool_t => bool, drop the redundant initialiser, and you need to patch xen-command-line.markdown.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 20 lines · Andrew Cooper
Quoted 19 lines · George Dunlap
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 <[email protected]>Signed-off-by George Dunlap <[email protected]>---
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.
Quoted 8 lines
Quoted 5 lines
CC Ian Jackson <[email protected]>CC Dario Faggioli <[email protected]>CC Andrew Cooper <[email protected]>CC Jan Beulich <[email protected]>CC Marek Marczykowski-Górecki <[email protected]>
bool_t=> bool, drop the redundant initialiser, and you need to patch xen-command-line.markdown.
Hmm, actually -- would it make more sense to add this as an option to acpi_sleep? e.g., "acpi_sleep=s3_fake"? (Along with s3_bios and s3_mode?)
-George
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 9 lines · George Dunlap
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · George Dunlap
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.
Quoted 8 lines
Quoted 3 lines
bool_t=> bool, drop the redundant initialiser, and you need to patch
xen-command-line.markdown.Hmm, actually -- would it make more sense to add this as an option to
acpi_sleep? e.g., "acpi_sleep=s3_fake"? (Along withs3_biosands3_mode?)
This actually seems a good idea to me.
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Software Engineer @ SUSE https://www.suse.com/
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 21.05.18 at 16:16, <[email protected]> wrote:
Most server-class hardware doesn't support ACPI S3 suspend;
Is that really the case? I though S3 was pretty "normal" these days.
Quoted 1 line
but most bugs we'll run across won't need actual S3 to trigger.
Not sure about this one either: In particular the microcode issue addressed recently does require actual S3 to surface. I'm not meaning to put under question the usefulness of this option, though. I'd just like the description to not lead to people drawing wrong conclusions.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 28 lines
Quoted 1 line
Quoted 1 line · On 21.05.18 at 17:33, <[email protected]> wrote:
Quoted 26 lines · Andrew Cooper
Quoted 24 lines · George Dunlap
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 <[email protected]>Signed-off-by George Dunlap <[email protected]>---
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 <[email protected]>CC Dario Faggioli <[email protected]>CC Andrew Cooper <[email protected]>CC Jan Beulich <[email protected]>CC Marek Marczykowski-Górecki <[email protected]>
Quoted 5 lines
Quoted 2 lines
bool_t=> bool, drop the redundant initialiser, and you need to patch xen-command-line.markdown.Hmm, actually -- would it make more sense to add this as an option to
acpi_sleep? e.g., "acpi_sleep=s3_fake"? (Along withs3_biosands3_mode?)
+1
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 3 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 21.05.18 at 16:16, <[email protected]> wrote:
Most server-class hardware doesn't support ACPI S3 suspend;
Is that really the case? I though S3 was pretty "normal" these days.
I don't think I've never encountered a server without S3, although sometimes it does require enabling in the firmware.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 21.05.18 at 16:16, <[email protected]> wrote:
Most server-class hardware doesn't support ACPI S3 suspend;
Is that really the case? I though S3 was pretty "normal" these days.
Quoted 7 lines
Quoted 1 line
but most bugs we'll run across won't need actual S3 to trigger.
Not sure about this one either: In particular the microcode issue addressed recently does require actual S3 to surface. I'm not meaning to put under question the usefulness of this option, though. I'd just like the description to not lead to people drawing wrong conclusions.
Re S3 support, I was just repeating what I'd heard. My judgement is still that "most" bugs we end up encountering will be on the Xen side; but I'm happy to reword it to take out / moderate both implications.
-George
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 22.05.18 at 13:21, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 21.05.18 at 16:16, <[email protected]> wrote:
Most server-class hardware doesn't support ACPI S3 suspend;
Is that really the case? I though S3 was pretty "normal" these days.
Quoted 7 lines
Quoted 1 line
but most bugs we'll run across won't need actual S3 to trigger.
Not sure about this one either: In particular the microcode issue addressed recently does require actual S3 to surface. I'm not meaning to put under question the usefulness of this option, though. I'd just like the description to not lead to people drawing wrong conclusions.
Quoted 3 lines
Re S3 support, I was just repeating what I'd heard. My judgement is still that "most" bugs we end up encountering will be on the Xen side; but I'm happy to reword it to take out / moderate both implications.
Oh, surely issues normally are on the Xen side. It's just that there's a fair range of issues which still require actually going through S3 to show up - the ucode issues after XSA-254 are a good example thereof.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 15 lines · Jan Beulich
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 22.05.18 at 13:21, <[email protected]> wrote:
Quoted 12 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 21.05.18 at 16:16, <[email protected]> wrote:
Most server-class hardware doesn't support ACPI S3 suspend;
Is that really the case? I though S3 was pretty "normal" these days.
Quoted 1 line
but most bugs we'll run across won't need actual S3 to trigger.
Not sure about this one either: In particular the microcode issue addressed recently does require actual S3 to surface. I'm not meaning to put under question the usefulness of this option, though. I'd just like the description to not lead to people drawing wrong conclusions.
Quoted 7 lines
Quoted 3 lines
Re S3 support, I was just repeating what I'd heard. My judgement is still that "most" bugs we end up encountering will be on the Xen side; but I'm happy to reword it to take out / moderate both implications.
Oh, surely issues normally are on the Xen side. It's just that there's a fair range of issues which still require actually going through S3 to show up - the ucode issues after XSA-254 are a good example thereof.
Well FWIW with acpi_power=s3_fake on staging+patch, the machine hangs with default bti / xpti settings, and works with bti and xpti disabled. So at least some part of XSA-254 issues can / would be caught without having to actually enter real S3.
-George
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel