aboutsummaryrefslogtreecommitdiff
path: root/hw/xen
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-06-16 11:48:22 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-06-16 11:48:23 +0100
commit6675a653d2e57ab09c32c0ea7b44a1d6c40a7f58 (patch)
treef111fb308c19e2b4f2dd8b8482e057b4f3490362 /hw/xen
parentf5e34624f28f37ec3c8a93bdee348effee966a78 (diff)
parentb77b5b3dc7a4730d804090d359c57d33573cf85a (diff)
downloadqemu-6675a653d2e57ab09c32c0ea7b44a1d6c40a7f58.zip
qemu-6675a653d2e57ab09c32c0ea7b44a1d6c40a7f58.tar.gz
qemu-6675a653d2e57ab09c32c0ea7b44a1d6c40a7f58.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-qom-2020-06-15' into staging
QOM patches for 2020-06-15 # gpg: Signature made Mon 15 Jun 2020 21:07:19 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qom-2020-06-15: (84 commits) MAINTAINERS: Make section QOM cover hw/core/*bus.c as well qdev: qdev_init_nofail() is now unused, drop qdev: Convert bus-less devices to qdev_realize() with Coccinelle qdev: Use qdev_realize() in qdev_device_add() qdev: Make qdev_realize() support bus-less devices s390x/event-facility: Simplify creation of SCLP event devices microbit: Eliminate two local variables in microbit_init() sysbus: sysbus_init_child_obj() is now unused, drop sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 4 sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 3 sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 2 sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 1 qdev: Drop qdev_realize() support for null bus sysbus: Convert to sysbus_realize() etc. with Coccinelle sysbus: New sysbus_realize(), sysbus_realize_and_unref() sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 2 hw/arm/armsse: Pass correct child size to sysbus_init_child_obj() sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 1 microbit: Tidy up sysbus_init_child_obj() @child argument sysbus: Drop useless OBJECT() in sysbus_init_child_obj() calls ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/xen')
-rw-r--r--hw/xen/xen-bus.c4
-rw-r--r--hw/xen/xen-legacy-backend.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c
index 32dd446..4b00320 100644
--- a/hw/xen/xen-bus.c
+++ b/hw/xen/xen-bus.c
@@ -1387,9 +1387,9 @@ type_init(xen_register_types)
void xen_bus_init(void)
{
- DeviceState *dev = qdev_create(NULL, TYPE_XEN_BRIDGE);
+ DeviceState *dev = qdev_new(TYPE_XEN_BRIDGE);
BusState *bus = qbus_create(TYPE_XEN_BUS, dev, NULL);
- qdev_init_nofail(dev);
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
qbus_set_bus_hotplug_handler(bus, &error_abort);
}
diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c
index f9d0138..2335ee2 100644
--- a/hw/xen/xen-legacy-backend.c
+++ b/hw/xen/xen-legacy-backend.c
@@ -278,9 +278,8 @@ static struct XenLegacyDevice *xen_be_get_xendev(const char *type, int dom,
xendev = g_malloc0(ops->size);
object_initialize(&xendev->qdev, ops->size, TYPE_XENBACKEND);
OBJECT(xendev)->free = g_free;
- qdev_set_parent_bus(DEVICE(xendev), xen_sysbus);
qdev_set_id(DEVICE(xendev), g_strdup_printf("xen-%s-%d", type, dev));
- qdev_init_nofail(DEVICE(xendev));
+ qdev_realize(DEVICE(xendev), xen_sysbus, &error_fatal);
object_unref(OBJECT(xendev));
xendev->type = type;
@@ -703,8 +702,8 @@ int xen_be_init(void)
xengnttab_close(gnttabdev);
}
- xen_sysdev = qdev_create(NULL, TYPE_XENSYSDEV);
- qdev_init_nofail(xen_sysdev);
+ xen_sysdev = qdev_new(TYPE_XENSYSDEV);
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(xen_sysdev), &error_fatal);
xen_sysbus = qbus_create(TYPE_XENSYSBUS, xen_sysdev, "xen-sysbus");
qbus_set_bus_hotplug_handler(xen_sysbus, &error_abort);