All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] grub-shell: Boot PowerPC using PMU instead of CUDA for power management
@ 2021-10-07 20:52 Glenn Washburn
  2021-10-11 10:48 ` Daniel Axtens
  0 siblings, 1 reply; 2+ messages in thread
From: Glenn Washburn @ 2021-10-07 20:52 UTC (permalink / raw)
  To: grub-devel, Daniel Kiper; +Cc: Glenn Washburn

A recent refactoring of CUDA command code has exposed a bug in OpenBIOS[1]
which was causing system powerdown and system reset to fail, thus causing
the Qemu instance to hang. This in turn caused the grub-shell command to
timeout causing it to return an error code when the test actually completed
successfully.

Since it could be a while before the patch fixing this issue in OpenBIOS
filters down to the average distro, switch to PMU to allow powerdowns and
reboots to work as expected.

[1] https://gitlab.com/qemu-project/qemu/-/issues/624

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
This is a correction of the commit message from patch #8 of the patch series
titled "More test fixes/improvements". The changes remain the same.

Glenn

Range-diff against v1:
1:  e13454839 ! 1:  754e7e77b grub-shell: Boot PowerPC using PMU instead of CUDA for power management
    @@ Metadata
      ## Commit message ##
         grub-shell: Boot PowerPC using PMU instead of CUDA for power management
     
    -    At some point it looks like the defualt machine for qemu-system-ppc started
    -    using CUDA as a backend for power management. This causes the machine to
    -    throw an exception and not actually power down the VM[1]. Switching to PMU
    -    allows power downs and reboots to work as expceted.
    +    A recent refactoring of CUDA command code has exposed a bug in OpenBIOS[1]
    +    which was causing system powerdown and system reset to fail, thus causing
    +    the Qemu instance to hang. This in turn caused the grub-shell command to
    +    timeout causing it to return an error code when the test actually completed
    +    successfully.
    +
    +    Since it could be a while before the patch fixing this issue in OpenBIOS
    +    filters down to the average distro, switch to PMU to allow powerdowns and
    +    reboots to work as expected.
     
         [1] https://gitlab.com/qemu-project/qemu/-/issues/624
     

 tests/util/grub-shell.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
index 93e9f5148..5354d8678 100644
--- a/tests/util/grub-shell.in
+++ b/tests/util/grub-shell.in
@@ -84,6 +84,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
 	serial_null="-serial null"
 	netbootext=elf
 	trim=1
+	qemuopts="-M mac99,via=pmu $qemuopts"
 	;;
 
     sparc64-ieee1275)
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] grub-shell: Boot PowerPC using PMU instead of CUDA for power management
  2021-10-07 20:52 [PATCH v2] grub-shell: Boot PowerPC using PMU instead of CUDA for power management Glenn Washburn
@ 2021-10-11 10:48 ` Daniel Axtens
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Axtens @ 2021-10-11 10:48 UTC (permalink / raw)
  To: Glenn Washburn, grub-devel, Daniel Kiper; +Cc: Glenn Washburn

Glenn Washburn <development@efficientek.com> writes:

> A recent refactoring of CUDA command code has exposed a bug in OpenBIOS[1]
> which was causing system powerdown and system reset to fail, thus causing
> the Qemu instance to hang. This in turn caused the grub-shell command to
> timeout causing it to return an error code when the test actually completed
> successfully.
>
> Since it could be a while before the patch fixing this issue in OpenBIOS
> filters down to the average distro, switch to PMU to allow powerdowns and
> reboots to work as expected.
>

This is good for ppc, but it breaks for pseries:

$ echo 'echo hi;' | ./grub-shell --pseries 
WARNING: Image format was not specified for '/tmp/tmp.W9bYMpcqGX' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
qemu-system-ppc64: Property 'pseries-hirsute-machine.via' not found

It ends up being:

timeout -s KILL 60 qemu-system-ppc64 -M mac99,via=pmu -M pseries \
 -no-reboot -nographic -monitor file:/dev/null  \
 -fw_cfg name=etc/sercon-port,string=0 -serial file:/dev/stdout \
 -hda /tmp/tmp.i96l2WaBHo -boot c

I think `-M pseries` will override the `mac99` part but not the `via=pmu`.

Kind regards,
Daniel

> [1] https://gitlab.com/qemu-project/qemu/-/issues/624
>
> Signed-off-by: Glenn Washburn <development@efficientek.com>
> ---
> This is a correction of the commit message from patch #8 of the patch series
> titled "More test fixes/improvements". The changes remain the same.
>
> Glenn
>
> Range-diff against v1:
> 1:  e13454839 ! 1:  754e7e77b grub-shell: Boot PowerPC using PMU instead of CUDA for power management
>     @@ Metadata
>       ## Commit message ##
>          grub-shell: Boot PowerPC using PMU instead of CUDA for power management
>      
>     -    At some point it looks like the defualt machine for qemu-system-ppc started
>     -    using CUDA as a backend for power management. This causes the machine to
>     -    throw an exception and not actually power down the VM[1]. Switching to PMU
>     -    allows power downs and reboots to work as expceted.
>     +    A recent refactoring of CUDA command code has exposed a bug in OpenBIOS[1]
>     +    which was causing system powerdown and system reset to fail, thus causing
>     +    the Qemu instance to hang. This in turn caused the grub-shell command to
>     +    timeout causing it to return an error code when the test actually completed
>     +    successfully.
>     +
>     +    Since it could be a while before the patch fixing this issue in OpenBIOS
>     +    filters down to the average distro, switch to PMU to allow powerdowns and
>     +    reboots to work as expected.
>      
>          [1] https://gitlab.com/qemu-project/qemu/-/issues/624
>      
>
>  tests/util/grub-shell.in | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
> index 93e9f5148..5354d8678 100644
> --- a/tests/util/grub-shell.in
> +++ b/tests/util/grub-shell.in
> @@ -84,6 +84,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
>  	serial_null="-serial null"
>  	netbootext=elf
>  	trim=1
> +	qemuopts="-M mac99,via=pmu $qemuopts"
>  	;;
>  
>      sparc64-ieee1275)
> -- 
> 2.27.0
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-11 10:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-07 20:52 [PATCH v2] grub-shell: Boot PowerPC using PMU instead of CUDA for power management Glenn Washburn
2021-10-11 10:48 ` Daniel Axtens

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.