diff options
author | Thomas Huth <thuth@redhat.com> | 2023-05-10 21:30:45 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2023-05-22 09:44:48 +0200 |
commit | 545d8574bafbfe308908f10b4027010f6a12a441 (patch) | |
tree | 9d3ab410675930dbe31d3032ab179a225dc3d08d /hw | |
parent | 963e94a97b3052529678253c6e6efcf102ca3635 (diff) | |
download | qemu-545d8574bafbfe308908f10b4027010f6a12a441.zip qemu-545d8574bafbfe308908f10b4027010f6a12a441.tar.gz qemu-545d8574bafbfe308908f10b4027010f6a12a441.tar.bz2 |
hw/i386: Ignore the default parallel port if it has not been compiled into QEMU
Don't try to instantiate the parallel port if it has not been
enabled in the build configuration.
Message-Id: <20230512124033.502654-10-thuth@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/i386/pc_piix.c | 3 | ||||
-rw-r--r-- | hw/i386/pc_q35.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 17892ad..d5b0dcd 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -26,6 +26,7 @@ #include CONFIG_DEVICES #include "qemu/units.h" +#include "hw/char/parallel.h" #include "hw/dma/i8257.h" #include "hw/loader.h" #include "hw/i386/x86.h" @@ -458,6 +459,7 @@ static void pc_i440fx_machine_options(MachineClass *m) m->default_machine_opts = "firmware=bios-256k.bin"; m->default_display = "std"; m->default_nic = "e1000"; + m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL); machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE); } @@ -886,6 +888,7 @@ static void isapc_machine_options(MachineClass *m) pcmc->has_reserved_memory = false; m->default_nic = "ne2k_isa"; m->default_cpu_type = X86_CPU_TYPE_NAME("486"); + m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL); } DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 7e0f354..6155427 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -30,6 +30,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" +#include "hw/char/parallel.h" #include "hw/loader.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" @@ -367,6 +368,7 @@ static void pc_q35_machine_options(MachineClass *m) m->default_nic = "e1000e"; m->default_kernel_irqchip_split = false; m->no_floppy = 1; + m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL); machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); |