qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Bharata B Rao <bharata@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, imammedo@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/1] spapr: Prevent boot CPU core removal
Date: Wed, 27 Jul 2016 16:11:03 +1000	[thread overview]
Message-ID: <20160727061103.GM17429@voom.fritz.box> (raw)
In-Reply-To: <1469596482-4048-1-git-send-email-bharata@linux.vnet.ibm.com>

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

On Wed, Jul 27, 2016 at 10:44:42AM +0530, Bharata B Rao wrote:
> Boot CPU is assumed to be always present in QEMU code. So
> until that assumptions are gone, deny removal request.
> In another words, QEMU won't support boot CPU core hot-unplug.
> 
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>

Applied to ppc-for-2.7, but I've changed the message slightly to avoid
the ambiguity between:
	un-pluggable - "may not be plugged (or unplugged)"
	unplug-able  - "may be unplugged"

> ---
>  hw/ppc/spapr_cpu_core.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
> index 5a132bf..0dadf48 100644
> --- a/hw/ppc/spapr_cpu_core.c
> +++ b/hw/ppc/spapr_cpu_core.c
> @@ -133,6 +133,11 @@ void spapr_core_unplug(HotplugHandler *hotplug_dev, DeviceState *dev,
>      sPAPRDRConnectorClass *drck;
>      Error *local_err = NULL;
>  
> +    if (index == 0) {
> +        error_setg(errp, "Boot CPU core is unpluggable");
> +        return;
> +    }
> +
>      g_assert(drc);
>  
>      drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);

-- 
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 --]

      reply	other threads:[~2016-07-27  6:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27  5:14 [Qemu-devel] [PATCH 1/1] spapr: Prevent boot CPU core removal Bharata B Rao
2016-07-27  6:11 ` 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=20160727061103.GM17429@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=imammedo@redhat.com \
    --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).