On Thu, Jul 21, 2016 at 05:54:37PM +0200, Igor Mammedov wrote: > It will enshure that cpu_index for a given cpu stays the same > regardless of the order cpus has been created/deleted and so > it would be possible to migrate QEMU instance with out of order > created CPU. > > Signed-off-by: Igor Mammedov <imamm...@redhat.com>
Now that I've merged Greg's patch fix the core ids so this is no longer a problem, I've merged this patch into ppc-for-2.7 on top of your more-recent version of this series. > --- > hw/ppc/spapr_cpu_core.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c > index 4bfc96b..f68e88d 100644 > --- a/hw/ppc/spapr_cpu_core.c > +++ b/hw/ppc/spapr_cpu_core.c > @@ -309,9 +309,13 @@ static void spapr_cpu_core_realize(DeviceState *dev, > Error **errp) > sc->threads = g_malloc0(size * cc->nr_threads); > for (i = 0; i < cc->nr_threads; i++) { > char id[32]; > + CPUState *cs; > + > obj = sc->threads + i * size; > > object_initialize(obj, size, typename); > + cs = CPU(obj); > + cs->cpu_index = cc->core_id + i; > snprintf(id, sizeof(id), "thread[%d]", i); > object_property_add_child(OBJECT(sc), id, obj, &local_err); > if (local_err) { -- 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