Greg Kurz 94ad93bd97 spapr_cpu_core: instantiate CPUs separately
The current code assumes that only the CPU core object holds a
reference on each individual CPU object, and happily frees their
allocated memory when the core is unrealized. This is dangerous
as some other code can legitimely keep a pointer to a CPU if it
calls object_ref(), but it would end up with a dangling pointer.

Let's allocate all CPUs with object_new() and let QOM free them
when their reference count reaches zero. This greatly simplify the
code as we don't have to fiddle with the instance size anymore.

Signed-off-by: Greg Kurz <groug@kaod.org>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-12-15 09:49:23 +11:00
..
2017-09-08 09:30:55 +10:00
2017-12-13 17:59:26 +00:00
2017-10-15 05:54:40 +03:00
2017-11-20 11:08:00 +08:00
2017-09-21 16:36:56 +01:00
2017-12-15 09:49:23 +11:00
2017-09-08 16:15:17 +03:00