[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/12] hw/s390x: Attach default virtio-net devices to the /machine
From: |
Thomas Huth |
Subject: |
[PULL 09/12] hw/s390x: Attach default virtio-net devices to the /machine/virtual-css-bridge |
Date: |
Tue, 2 Jul 2024 12:33:07 +0200 |
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>
---
hw/s390x/s390-virtio-ccw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index f87ca36264..c1edbd9131 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -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)
{
DeviceState *dev;
+ int cnt = 0;
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);
}
}
--
2.45.2
- [PULL 02/12] tests/qtest/migration-test: enable on s390x with TCG, (continued)
- [PULL 04/12] tests/qtest: Free unused QMP response, Thomas Huth, 2024/07/02
- [PULL 03/12] tests/qtest: Use qtest_add_data_func_full(), Thomas Huth, 2024/07/02
- [PULL 05/12] tests/qtest: Free old machine variable name, Thomas Huth, 2024/07/02
- [PULL 06/12] tests/qtest: Free paths, Thomas Huth, 2024/07/02
- [PULL 07/12] tests/qtest: Free GThread, Thomas Huth, 2024/07/02
- [PULL 08/12] docs: add precision about capstone for execlog plugin, Thomas Huth, 2024/07/02
- [PULL 09/12] hw/s390x: Attach default virtio-net devices to the /machine/virtual-css-bridge,
Thomas Huth <=
- [PULL 11/12] .travis.yml: Install python3-tomli in all build jobs, Thomas Huth, 2024/07/02
- [PULL 10/12] tests/avocado: add hotplug_blk test, Thomas Huth, 2024/07/02
- [PULL 12/12] pc-bios/s390-ccw: Remove duplicated LDFLAGS, Thomas Huth, 2024/07/02
- Re: [PULL 00/12] qtest, s390x, avocado and doc patches, Richard Henderson, 2024/07/03