All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Thomas Huth <thuth@redhat.com>
Cc: drjones@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Halt CPU when powering off via RTAS call
Date: Thu, 18 Feb 2016 11:08:33 +1100	[thread overview]
Message-ID: <20160218000833.GA20260@voom.redhat.com> (raw)
In-Reply-To: <1455733399-4939-1-git-send-email-thuth@redhat.com>

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

On Wed, Feb 17, 2016 at 07:23:19PM +0100, Thomas Huth wrote:
> The LoPAPR specification defines the following for the RTAS
> power-off call: "On successful operation, does not return".
> However, the implementation in QEMU currently returns and runs
> the guest CPU again for some more cycles. This caused some
> trouble with the new ppc implementation of the kvm-unit-tests
> recently. So let's make sure that the QEMU implementation
> follows the spec, thus stop the CPU to make sure that the
> RTAS call does not return to the guest anymore.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Applied to ppc-for-2.6, thanks.

> ---
>  hw/ppc/spapr_rtas.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> index 07ad672..b7c5ebd 100644
> --- a/hw/ppc/spapr_rtas.c
> +++ b/hw/ppc/spapr_rtas.c
> @@ -113,6 +113,7 @@ static void rtas_power_off(PowerPCCPU *cpu, sPAPRMachineState *spapr,
>          return;
>      }
>      qemu_system_shutdown_request();
> +    cpu_stop_current();
>      rtas_st(rets, 0, RTAS_OUT_SUCCESS);
>  }
>  

-- 
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: 819 bytes --]

      parent reply	other threads:[~2016-02-18  0:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 18:23 [Qemu-devel] [PATCH] hw/ppc/spapr: Halt CPU when powering off via RTAS call Thomas Huth
2016-02-17 18:52 ` Andrew Jones
2016-02-18  0:08 ` David Gibson [this message]

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=20160218000833.GA20260@voom.redhat.com \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=drjones@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /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 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.