hw/s390x: Attach default virtio-net devices to the /machine/virtual-css-bridge
The initial virtio-net-ccw devices currently do not have a proper parent in the QOM tree, so they show up under /machine/unattached - which is somewhat ugly. Let's attach them to /machine/virtual-css-bridge/virtual-css instead. Message-ID: <20240701200108.154271-1-thuth@redhat.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
5f79abcf74
commit
999c870e9e
@ -216,8 +216,11 @@ static void s390_init_ipl_dev(const char *kernel_filename,
|
|||||||
static void s390_create_virtio_net(BusState *bus, const char *name)
|
static void s390_create_virtio_net(BusState *bus, const char *name)
|
||||||
{
|
{
|
||||||
DeviceState *dev;
|
DeviceState *dev;
|
||||||
|
int cnt = 0;
|
||||||
|
|
||||||
while ((dev = qemu_create_nic_device(name, true, "virtio"))) {
|
while ((dev = qemu_create_nic_device(name, true, "virtio"))) {
|
||||||
|
g_autofree char *childname = g_strdup_printf("%s[%d]", name, cnt++);
|
||||||
|
object_property_add_child(OBJECT(bus), childname, OBJECT(dev));
|
||||||
qdev_realize_and_unref(dev, bus, &error_fatal);
|
qdev_realize_and_unref(dev, bus, &error_fatal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user