qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-trivial@nongnu.org, qemu-ppc@nongnu.org,
	qemu-devel@nongnu.org, ehabkost@redhat.com, armbru@redhat.com,
	imammedo@redhat.com, "Cédric Le Goater" <clg@kaod.org>
Subject: Re: [Qemu-devel] [PATCH] monitor: fix crash for platforms without a CPU 0
Date: Thu, 22 Sep 2016 10:17:36 +1000	[thread overview]
Message-ID: <20160922001736.GM1809@umbus.fritz.box> (raw)
In-Reply-To: <20160921105049.55ede6b1@redhat.com>

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

On Wed, Sep 21, 2016 at 10:50:49AM -0400, Luiz Capitulino wrote:
> On Wed, 21 Sep 2016 15:29:26 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > Now that we allow CPU hot unplug on a few platforms, we can end up in a
> > situation where we don't have a CPU with index 0.  Or at least we could,
> > if we didn't have code to explicitly prohibit unplug of CPU 0.
> > 
> > Longer term we want to allow CPU 0 unplug, this patch is an early step in
> > allowing this, by removing an assumption in the monitor code that CPU 0
> > always exists.
> > 
> > Signed-off-by: Cédric Le Goater <clg@kaod.org>
> > [dwg: Rewrote commit message to better explain background]
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> > ---
> >  monitor.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Anyone want to volunteer to take this through their tree?  If not, I
> > can take it through my ppc tree.
> 
> Please do.

Ok, merged to ppc-for-2.8.

> 
> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
> 
> > 
> > diff --git a/monitor.c b/monitor.c
> > index 8bb8bbf..83c4edf 100644
> > --- a/monitor.c
> > +++ b/monitor.c
> > @@ -1025,7 +1025,7 @@ int monitor_set_cpu(int cpu_index)
> >  CPUState *mon_get_cpu(void)
> >  {
> >      if (!cur_mon->mon_cpu) {
> > -        monitor_set_cpu(0);
> > +        monitor_set_cpu(first_cpu->cpu_index);
> >      }
> >      cpu_synchronize_state(cur_mon->mon_cpu);
> >      return cur_mon->mon_cpu;
> 

-- 
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-09-22  0:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21  5:29 [Qemu-devel] [PATCH] monitor: fix crash for platforms without a CPU 0 David Gibson
2016-09-21 11:36 ` Igor Mammedov
2016-09-21 12:14 ` Eduardo Habkost
2016-09-22  0:17   ` David Gibson
2016-09-21 14:50 ` Luiz Capitulino
2016-09-22  0:17   ` 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=20160922001736.GM1809@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=armbru@redhat.com \
    --cc=clg@kaod.org \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-trivial@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).