mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
hw/boards: Do not create unusable default if=sd drives
A number of machines create an if=sd drive by default even though
they lack an SD bus, and therefore cannot use the drive.
This drive is created when the machine sets flag
@auto_create_sdcard.
See for example running HMP "info block" on the HPPA C3700 machine:
$ qemu-system-hppa -M C3700 -monitor stdio -S
(qemu) info block
floppy0: [not inserted]
Removable device: not locked, tray closed
sd0: [not inserted]
Removable device: not locked, tray closed
$ qemu-system-hppa -M C3700 -sd /bin/sh
qemu-system-hppa: -sd /bin/sh: machine type does not support if=sd,bus=0,unit=0
Delete that from machines that lack an SD bus.
Note, only the ARM and RISCV targets use such feature:
$ git grep -wl IF_SD hw | cut -d/ -f-2 | sort -u
hw/arm
hw/riscv
$
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20250204200934.65279-5-philmd@linaro.org>
This commit is contained in:
@@ -213,7 +213,6 @@ static void clipper_machine_init(MachineClass *mc)
|
||||
mc->default_cpu_type = ALPHA_CPU_TYPE_NAME("ev67");
|
||||
mc->default_ram_id = "ram";
|
||||
mc->default_nic = "e1000";
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("clipper", clipper_machine_init)
|
||||
|
||||
@@ -67,7 +67,6 @@ static void arduino_machine_class_init(ObjectClass *oc, void *data)
|
||||
mc->no_floppy = 1;
|
||||
mc->no_cdrom = 1;
|
||||
mc->no_parallel = 1;
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
static void arduino_duemilanove_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
@@ -704,7 +704,6 @@ static void HP_B160L_machine_init_class_init(ObjectClass *oc, void *data)
|
||||
mc->default_boot_order = "cd";
|
||||
mc->default_ram_id = "ram";
|
||||
mc->default_nic = "tulip";
|
||||
mc->auto_create_sdcard = true;
|
||||
|
||||
nc->nmi_monitor_handler = hppa_nmi;
|
||||
}
|
||||
@@ -741,7 +740,6 @@ static void HP_C3700_machine_init_class_init(ObjectClass *oc, void *data)
|
||||
mc->default_boot_order = "cd";
|
||||
mc->default_ram_id = "ram";
|
||||
mc->default_nic = "tulip";
|
||||
mc->auto_create_sdcard = true;
|
||||
|
||||
nc->nmi_monitor_handler = hppa_nmi;
|
||||
}
|
||||
|
||||
@@ -1799,7 +1799,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
|
||||
mc->smp_props.dies_supported = true;
|
||||
mc->smp_props.modules_supported = true;
|
||||
mc->default_ram_id = "pc.ram";
|
||||
mc->auto_create_sdcard = true;
|
||||
pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_AUTO;
|
||||
|
||||
object_class_property_add(oc, PC_MACHINE_MAX_RAM_BELOW_4G, "size",
|
||||
|
||||
@@ -382,7 +382,6 @@ static void x86_machine_class_init(ObjectClass *oc, void *data)
|
||||
mc->get_default_cpu_node_id = x86_get_default_cpu_node_id;
|
||||
mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids;
|
||||
mc->kvm_type = x86_kvm_type;
|
||||
mc->auto_create_sdcard = true;
|
||||
x86mc->save_tsc_khz = true;
|
||||
x86mc->fwcfg_dma_enabled = true;
|
||||
nc->nmi_monitor_handler = x86_nmi;
|
||||
|
||||
@@ -82,7 +82,6 @@ static void xen_pvh_machine_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
mc->desc = "Xen PVH x86 machine";
|
||||
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
|
||||
mc->auto_create_sdcard = true;
|
||||
|
||||
/* mc->max_cpus holds the MAX value allowed in the -smp cmd-line opts. */
|
||||
mc->max_cpus = HVM_MAX_VCPUS;
|
||||
|
||||
@@ -954,7 +954,6 @@ static void virt_class_init(ObjectClass *oc, void *data)
|
||||
mc->block_default_type = IF_VIRTIO;
|
||||
mc->default_boot_order = "c";
|
||||
mc->no_cdrom = 1;
|
||||
mc->auto_create_sdcard = true;
|
||||
mc->possible_cpu_arch_ids = virt_possible_cpu_arch_ids;
|
||||
mc->cpu_index_to_instance_props = virt_cpu_index_to_props;
|
||||
mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
|
||||
|
||||
@@ -99,7 +99,6 @@ static void an5206_machine_init(MachineClass *mc)
|
||||
mc->init = an5206_init;
|
||||
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5206");
|
||||
mc->default_ram_id = "an5206.ram";
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("an5206", an5206_machine_init)
|
||||
|
||||
@@ -398,7 +398,6 @@ static void mcf5208evb_machine_init(MachineClass *mc)
|
||||
mc->is_default = true;
|
||||
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m5208");
|
||||
mc->default_ram_id = "mcf5208.ram";
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("mcf5208evb", mcf5208evb_machine_init)
|
||||
|
||||
@@ -1359,7 +1359,6 @@ static void next_machine_class_init(ObjectClass *oc, void *data)
|
||||
mc->default_ram_id = "next.ram";
|
||||
mc->default_cpu_type = M68K_CPU_TYPE_NAME("m68040");
|
||||
mc->no_cdrom = true;
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
static const TypeInfo next_typeinfo = {
|
||||
|
||||
@@ -743,7 +743,6 @@ static void q800_machine_class_init(ObjectClass *oc, void *data)
|
||||
mc->max_cpus = 1;
|
||||
mc->block_default_type = IF_SCSI;
|
||||
mc->default_ram_id = "m68k_mac.ram";
|
||||
mc->auto_create_sdcard = true;
|
||||
machine_add_audiodev_property(mc);
|
||||
compat_props_add(mc->compat_props, hw_compat_q800, hw_compat_q800_len);
|
||||
|
||||
|
||||
@@ -318,7 +318,6 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
|
||||
mc->max_cpus = 1;
|
||||
mc->no_floppy = 1;
|
||||
mc->no_parallel = 1;
|
||||
mc->auto_create_sdcard = true;
|
||||
mc->default_ram_id = "m68k_virt.ram";
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,6 @@ static void petalogix_ml605_machine_init(MachineClass *mc)
|
||||
mc->desc = "PetaLogix linux refdesign for xilinx ml605 (little endian)";
|
||||
#endif
|
||||
mc->init = petalogix_ml605_init;
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("petalogix-ml605", petalogix_ml605_machine_init)
|
||||
|
||||
@@ -142,7 +142,6 @@ static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc, void *data)
|
||||
mc->desc = "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800";
|
||||
mc->init = petalogix_s3adsp1800_init;
|
||||
mc->is_default = true;
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
static const TypeInfo petalogix_s3adsp1800_machine_types[] = {
|
||||
|
||||
@@ -188,7 +188,6 @@ static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc)
|
||||
mc->desc = "Xilinx ZynqMP PMU machine (little endian)";
|
||||
#endif
|
||||
mc->init = xlnx_zynqmp_pmu_init;
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("xlnx-zynqmp-pmu", xlnx_zynqmp_pmu_machine_init)
|
||||
|
||||
@@ -842,7 +842,6 @@ static void boston_mach_class_init(MachineClass *mc)
|
||||
mc->default_ram_id = "boston.ddr";
|
||||
mc->max_cpus = 16;
|
||||
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("I6400");
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
DEFINE_MACHINE("boston", boston_mach_class_init)
|
||||
|
||||
@@ -335,7 +335,6 @@ static void mips_fuloong2e_machine_init(MachineClass *mc)
|
||||
mc->default_ram_size = 256 * MiB;
|
||||
mc->default_ram_id = "fuloong2e.ram";
|
||||
mc->minimum_page_bits = 14;
|
||||
mc->auto_create_sdcard = true;
|
||||
machine_add_audiodev_property(mc);
|
||||
}
|
||||
|
||||
|
||||
@@ -424,7 +424,6 @@ static void mips_magnum_class_init(ObjectClass *oc, void *data)
|
||||
mc->block_default_type = IF_SCSI;
|
||||
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
|
||||
mc->default_ram_id = "mips_jazz.ram";
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
static const TypeInfo mips_magnum_type = {
|
||||
@@ -442,7 +441,6 @@ static void mips_pica61_class_init(ObjectClass *oc, void *data)
|
||||
mc->block_default_type = IF_SCSI;
|
||||
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("R4000");
|
||||
mc->default_ram_id = "mips_jazz.ram";
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
static const TypeInfo mips_pica61_type = {
|
||||
|
||||
@@ -679,7 +679,6 @@ static void loongson3v_machine_class_init(ObjectClass *oc, void *data)
|
||||
mc->default_ram_size = 1600 * MiB;
|
||||
mc->minimum_page_bits = 14;
|
||||
mc->default_nic = "virtio-net-pci";
|
||||
mc->auto_create_sdcard = true;
|
||||
}
|
||||
|
||||
static const TypeInfo loongson3_machine_types[] = {
|
||||
|
||||
@@ -1306,7 +1306,6 @@ static void mips_malta_machine_init(MachineClass *mc)
|
||||
mc->default_cpu_type = MIPS_CPU_TYPE_NAME("24Kf");
|
||||
#endif
|
||||
mc->default_ram_id = "mips_malta.ram";
|
||||
mc->auto_create_sdcard = true;
|
||||
compat_props_add(mc->compat_props, malta_compat, malta_compat_len);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user