@@ -60,6 +60,7 @@ static void x86_cpu_new(X86MachineState *x86ms, int64_t apic_id, Error **errp)
if (!object_property_set_uint(cpu, "apic-id", apic_id, errp)) {
goto out;
}
+ object_property_add_child(OBJECT(x86ms), "cpu[*]", OBJECT(cpu));
qdev_realize(DEVICE(cpu), NULL, errp);
out:
@@ -83,6 +83,7 @@ petalogix_ml605_init(MachineState *machine)
/* init CPUs */
cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
+ object_property_add_child(OBJECT(machine), "cpu", OBJECT(cpu));
object_property_set_str(OBJECT(cpu), "version", "8.10.a", &error_abort);
/* Use FPU but don't use floating point conversion and square
* root instructions
@@ -73,6 +73,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
MemoryRegion *sysmem = get_system_memory();
cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
+ object_property_add_child(OBJECT(machine), "cpu", OBJECT(cpu));
object_property_set_str(OBJECT(cpu), "version", "7.10.d", &error_abort);
object_property_set_bool(OBJECT(cpu), "little-endian",
!TARGET_BIG_ENDIAN, &error_abort);
@@ -87,6 +87,7 @@ static void mips_cps_realize(DeviceState *dev, Error **errp)
/* All cores use the same clock tree */
qdev_connect_clock_in(DEVICE(cpu), "clk-in", s->clock);
+ object_property_add_child(OBJECT(dev), "cpu[*]", OBJECT(cpu));
if (!qdev_realize_and_unref(DEVICE(cpu), NULL, errp)) {
return;
}
@@ -955,6 +955,7 @@ void ppce500_init(MachineState *machine)
*/
object_property_set_bool(OBJECT(cs), "start-powered-off", i != 0,
&error_abort);
+ object_property_add_child(OBJECT(machine), "cpu[*]", OBJECT(cpu));
qdev_realize_and_unref(DEVICE(cs), NULL, &error_fatal);
if (!firstenv) {
@@ -2705,6 +2705,7 @@ static void spapr_init_cpus(SpaprMachineState *spapr)
&error_fatal);
object_property_set_int(core, CPU_CORE_PROP_CORE_ID, core_id,
&error_fatal);
+ object_property_add_child(OBJECT(spapr), "cpu[*]", OBJECT(core));
qdev_realize(DEVICE(core), NULL, &error_fatal);
object_unref(core);