qemu-irix/hw/cpu
Laurent Vivier de9b6728ff cpu: don't allow negative core id
With pseries machine type a negative core-id is not managed properly:
-1 gives an inaccurate error message ("core -1 already populated"),
-2 crashes QEMU (core dump)

As it seems a negative value is invalid for any architecture,
instead of checking this in spapr_core_pre_plug() I think it's better
to check this in the generic part, core_prop_set_core_id()

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20170802103259.25940-1-lvivier@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
(cherry picked from commit be2960baae)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2017-08-24 18:40:13 -05:00
..
Makefile.objs cpu: Abstract CPU core type 2016-06-17 16:33:48 +10:00
a9mpcore.c explicitly include qom/cpu.h 2016-05-19 16:42:27 +02:00
a15mpcore.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
arm11mpcore.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
core.c cpu: don't allow negative core id 2017-08-24 18:40:13 -05:00
realview_mpcore.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00