[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] monitor: fix crash for platforms without a CP
From: |
David Gibson |
Subject: |
Re: [Qemu-trivial] [PATCH] monitor: fix crash for platforms without a CPU 0 |
Date: |
Thu, 22 Sep 2016 10:17:36 +1000 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On Wed, Sep 21, 2016 at 10:50:49AM -0400, Luiz Capitulino wrote:
> On Wed, 21 Sep 2016 15:29:26 +1000
> David Gibson <address@hidden> 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 <address@hidden>
> > [dwg: Rewrote commit message to better explain background]
> > Signed-off-by: David Gibson <address@hidden>
> > ---
> > 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 <address@hidden>
>
> >
> > 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
signature.asc
Description: PGP signature