[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/20] softmmu/vl.c: Disable default NIC if it has not been compil
|
From: |
Thomas Huth |
|
Subject: |
[PULL 04/20] softmmu/vl.c: Disable default NIC if it has not been compiled into the binary |
|
Date: |
Mon, 22 May 2023 13:49:58 +0200 |
Don't try to instantiate a default NIC if it is not available (since
this will cause QEMU to abort). Emit a warning instead.
Message-Id: <20230512124033.502654-5-thuth@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
softmmu/vl.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 43d3b972da..b0b96f67fa 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1294,6 +1294,13 @@ static void qemu_disable_default_devices(void)
default_monitor = 0;
default_net = 0;
default_vga = 0;
+ } else {
+ if (default_net && machine_class->default_nic &&
+ !module_object_class_by_name(machine_class->default_nic)) {
+ warn_report("Default NIC '%s' is not available in this binary",
+ machine_class->default_nic);
+ default_net = 0;
+ }
}
}
--
2.31.1
- [PULL 00/20] Allow "make check" with "--without-default-devices", Thomas Huth, 2023/05/22
- [PULL 04/20] softmmu/vl.c: Disable default NIC if it has not been compiled into the binary,
Thomas Huth <=
- [PULL 01/20] hw/i386/Kconfig: ISAPC works fine without VGA_ISA, Thomas Huth, 2023/05/22
- [PULL 03/20] hw: Move the default NIC machine class setting from the x86 to the generic one, Thomas Huth, 2023/05/22
- [PULL 07/20] hw/sh4: Use MachineClass->default_nic in the sh4 r2d machine, Thomas Huth, 2023/05/22
- [PULL 05/20] hw/ppc: Use MachineClass->default_nic in the ppc machines, Thomas Huth, 2023/05/22
- [PULL 11/20] tests/qtest/readconfig-test: Check for the availability of USB controllers, Thomas Huth, 2023/05/22
- [PULL 08/20] hw/char/parallel: Move TYPE_ISA_PARALLEL to the header file, Thomas Huth, 2023/05/22
- [PULL 09/20] hw/i386: Ignore the default parallel port if it has not been compiled into QEMU, Thomas Huth, 2023/05/22
- [PULL 06/20] hw/s390x: Use MachineClass->default_nic in the s390x machine, Thomas Huth, 2023/05/22
- [PULL 17/20] tests/qemu-iotests/172: Run QEMU with -vga none and -nic none, Thomas Huth, 2023/05/22
- [PULL 16/20] tests/qtest/meson.build: Run the net filter tests only with default devices, Thomas Huth, 2023/05/22