[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/18] hw/s390x: Use MachineClass->default_nic in the s390x machi
|
From: |
Thomas Huth |
|
Subject: |
[PATCH 06/18] hw/s390x: Use MachineClass->default_nic in the s390x machine |
|
Date: |
Fri, 12 May 2023 14:40:21 +0200 |
Mark the default NIC via the new MachineClass->default_nic setting
so that the machine-defaults code in vl.c can decide whether the
default NIC is usable or not (for example when compiling with the
"--without-default-devices" configure switch).
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/s390x/s390-virtio-ccw.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index e6f2c62625..fe30722e33 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -245,6 +245,7 @@ static void s390_create_sclpconsole(const char *type,
Chardev *chardev)
static void ccw_init(MachineState *machine)
{
+ MachineClass *mc = MACHINE_GET_CLASS(machine);
int ret;
VirtualCssBus *css_bus;
DeviceState *dev;
@@ -292,7 +293,7 @@ static void ccw_init(MachineState *machine)
}
/* Create VirtIO network adapters */
- s390_create_virtio_net(BUS(css_bus), "virtio-net-ccw");
+ s390_create_virtio_net(BUS(css_bus), mc->default_nic);
/* init consoles */
if (serial_hd(0)) {
@@ -746,6 +747,7 @@ static void ccw_machine_class_init(ObjectClass *oc, void
*data)
hc->unplug_request = s390_machine_device_unplug_request;
nc->nmi_monitor_handler = s390_nmi;
mc->default_ram_id = "s390.ram";
+ mc->default_nic = "virtio-net-ccw";
object_class_property_add_bool(oc, "aes-key-wrap",
machine_get_aes_key_wrap,
--
2.31.1
- [PATCH 00/18] Allow qtests with --without-default-devices (part 1), Thomas Huth, 2023/05/12
- [PATCH 02/18] softmmu/vl.c: Check for the availability of the VGA device before using it, Thomas Huth, 2023/05/12
- [PATCH 01/18] hw/i386/Kconfig: ISAPC works fine without VGA_ISA, Thomas Huth, 2023/05/12
- [PATCH 05/18] hw/ppc: Use MachineClass->default_nic in the ppc machines, Thomas Huth, 2023/05/12
- [PATCH 04/18] softmmu/vl.c: Disable default NIC if it has not been compiled into the binary, Thomas Huth, 2023/05/12
- [PATCH 07/18] hw/sh4: Use MachineClass->default_nic in the sh4 r2d machine, Thomas Huth, 2023/05/12
- [PATCH 03/18] hw: Move the default NIC machine class setting from the x86 to the generic one, Thomas Huth, 2023/05/12
- [PATCH 08/18] hw/char/parallel: Move TYPE_ISA_PARALLEL to the header file, Thomas Huth, 2023/05/12
- [PATCH 06/18] hw/s390x: Use MachineClass->default_nic in the s390x machine,
Thomas Huth <=
- [PATCH 09/18] hw/i386: Ignore the default parallel port if it has not been compiled into QEMU, Thomas Huth, 2023/05/12
- [PATCH 10/18] hw/sparc64/sun4u: Use MachineClass->default_nic and MachineClass->no_parallel, Thomas Huth, 2023/05/12
- [PATCH 11/18] tests/qtest/readconfig-test: Check for the availability of USB controllers, Thomas Huth, 2023/05/12
- [PATCH 12/18] tests/qtest/usb-hcd-uhci-test: Skip test if UHCI controller is not available, Thomas Huth, 2023/05/12
- [PATCH 15/18] tests/qtest: Check for the availability of virtio-ccw devices before using them, Thomas Huth, 2023/05/12
- [PATCH 13/18] tests/qtest/cdrom-test: Fix the test to also work without optional devices, Thomas Huth, 2023/05/12
- [PATCH 14/18] tests/qtest/virtio-ccw-test: Remove superfluous tests, Thomas Huth, 2023/05/12
- [PATCH 16/18] tests/qtest/meson.build: Run the net filter tests only with default devices, Thomas Huth, 2023/05/12