|
@@ -2113,6 +2113,21 @@ static void parse_memory_options(void)
|
|
|
loc_pop(&loc);
|
|
|
}
|
|
|
|
|
|
+static const char *const machine_containers[] = {
|
|
|
+ "unattached",
|
|
|
+ "peripheral",
|
|
|
+ "peripheral-anon"
|
|
|
+};
|
|
|
+
|
|
|
+static void qemu_create_machine_containers(Object *machine)
|
|
|
+{
|
|
|
+ int i;
|
|
|
+
|
|
|
+ for (i = 0; i < ARRAY_SIZE(machine_containers); i++) {
|
|
|
+ object_property_add_new_container(machine, machine_containers[i]);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
static void qemu_create_machine(QDict *qdict)
|
|
|
{
|
|
|
MachineClass *machine_class = select_machine(qdict, &error_fatal);
|
|
@@ -2121,6 +2136,7 @@ static void qemu_create_machine(QDict *qdict)
|
|
|
current_machine = MACHINE(object_new_with_class(OBJECT_CLASS(machine_class)));
|
|
|
object_property_add_child(object_get_root(), "machine",
|
|
|
OBJECT(current_machine));
|
|
|
+ qemu_create_machine_containers(OBJECT(current_machine));
|
|
|
object_property_add_child(container_get(OBJECT(current_machine),
|
|
|
"/unattached"),
|
|
|
"sysbus", OBJECT(sysbus_get_default()));
|