aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2023-10-23 09:37:54 +0100
committerDavid Woodhouse <dwmw@amazon.co.uk>2024-02-02 16:23:47 +0000
commit646f87a87408c04f42e1931637eb43bada4f36b5 (patch)
tree461ce7f162e0c38d84e1260e07912212699376b2 /hw/s390x
parent0a7549db0378ac828b80b991e9d99f6738575859 (diff)
hw/s390x/s390-virtio-ccw: use qemu_create_nic_device()
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Acked-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/s390-virtio-ccw.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index c99682b07d..62804cc228 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -229,16 +229,9 @@ static void s390_init_ipl_dev(const char *kernel_filename,
static void s390_create_virtio_net(BusState *bus, const char *name)
{
- int i;
-
- for (i = 0; i < nb_nics; i++) {
- NICInfo *nd = &nd_table[i];
- DeviceState *dev;
-
- qemu_check_nic_model(nd, "virtio");
+ DeviceState *dev;
- dev = qdev_new(name);
- qdev_set_nic_properties(dev, nd);
+ while ((dev = qemu_create_nic_device(name, true, "virtio"))) {
qdev_realize_and_unref(dev, bus, &error_fatal);
}
}