qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 6/6] ppc/pegasos2: Implement power-off RTAS function with VOF
Date: Fri, 15 Oct 2021 14:19:46 +1100	[thread overview]
Message-ID: <YWjzUu2L5eQVLfVa@yekko> (raw)
In-Reply-To: <1c1e030f2bbc86e950b3310fb5922facdc21ef86.1634241019.git.balaton@eik.bme.hu>

[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]

On Thu, Oct 14, 2021 at 09:50:19PM +0200, BALATON Zoltan wrote:
> This only helps Linux guests as only that seems to use it.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>

Applied, thanks.

> ---
>  hw/ppc/pegasos2.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c
> index 39e96d323f..e427ac2fe0 100644
> --- a/hw/ppc/pegasos2.c
> +++ b/hw/ppc/pegasos2.c
> @@ -22,6 +22,7 @@
>  #include "hw/i2c/smbus_eeprom.h"
>  #include "hw/qdev-properties.h"
>  #include "sysemu/reset.h"
> +#include "sysemu/runstate.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "hw/fw-path-provider.h"
> @@ -429,6 +430,16 @@ static target_ulong pegasos2_rtas(PowerPCCPU *cpu, Pegasos2MachineState *pm,
>          qemu_log_mask(LOG_UNIMP, "%c", ldl_be_phys(as, args));
>          stl_be_phys(as, rets, 0);
>          return H_SUCCESS;
> +    case RTAS_POWER_OFF:
> +    {
> +        if (nargs != 2 || nrets != 1) {
> +            stl_be_phys(as, rets, -1);
> +            return H_PARAMETER;
> +        }
> +        qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
> +        stl_be_phys(as, rets, 0);
> +        return H_SUCCESS;
> +    }
>      default:
>          qemu_log_mask(LOG_UNIMP, "Unknown RTAS token %u (args=%u, rets=%u)\n",
>                        token, nargs, nrets);

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-10-15  7:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 19:50 [PATCH 0/6] Misc pegasos2 patches BALATON Zoltan
2021-10-14 19:50 ` [PATCH 2/6] ppc/pegasos2: Warn when using VOF but no kernel is specified BALATON Zoltan
2021-10-15  3:15   ` David Gibson
2021-10-14 19:50 ` [PATCH 1/6] ppc/pegasos2: Restrict memory to 2 gigabytes BALATON Zoltan
2021-10-15  3:15   ` David Gibson
2021-10-14 19:50 ` [PATCH 3/6] ppc/pegasos2: Implement get-time-of-day RTAS function with VOF BALATON Zoltan
2021-10-15  3:17   ` David Gibson
2021-10-15  9:26     ` BALATON Zoltan
2021-10-15 21:51       ` BALATON Zoltan
2021-10-14 19:50 ` [PATCH 5/6] ppc/pegasos2: Add constants for PCI config addresses BALATON Zoltan
2021-10-15  3:19   ` David Gibson
2021-10-14 19:50 ` [PATCH 6/6] ppc/pegasos2: Implement power-off RTAS function with VOF BALATON Zoltan
2021-10-15  3:19   ` David Gibson [this message]
2021-10-14 19:50 ` [PATCH 4/6] ppc/pegasos2: Access MV64361 registers via their memory region BALATON Zoltan
2021-10-15  3:18   ` David Gibson
2021-10-15  3:20 ` [PATCH 0/6] Misc pegasos2 patches David Gibson
2021-10-15  9:28   ` BALATON Zoltan

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=YWjzUu2L5eQVLfVa@yekko \
    --to=david@gibson.dropbear.id.au \
    --cc=balaton@eik.bme.hu \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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).