Patchwork [v2,for-1.2,03/27] hw: Make default drives opt-in instead of opt-out for boards

login
register
mail settings
Submitter Markus Armbruster
Date Aug. 15, 2012, 7:17 p.m.
Message ID <1345058260-16229-4-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/177777/
State New
Headers show

Comments

Markus Armbruster - Aug. 15, 2012, 7:17 p.m.
Cc: Alexander Graf <agraf@suse.de>
Cc: Andreas Färber <andreas.faerber@web.de>
Cc: Andrzej Zaborowski <balrogg@gmail.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Dmitry Solodkiy <d.solodkiy@samsung.com>
Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Cc: Evgeny Voevodin <e.voevodin@samsung.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Hervé Poussineau <hpoussin@reactos.org>
Cc: Igor Mitsyanko <i.mitsyanko@samsung.com>
Cc: Jan Kiszka <jan.kiszka@web.de>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Maksim Kozlov <m.kozlov@samsung.com>
Cc: Mark Langsdorf <mark.langsdorf@calxeda.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Walle <michael@walle.cc>
Cc: Paul Brook <paul@codesourcery.com
Cc: Paul Brook <paul@codesourcery.com>
Cc: Peter Chubb <peter.chubb@nicta.com.au>
Cc: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: qemu-ppc@nongnu.org

Replace QEMUMachine no_floppy, no_cdrom, no_sdcard by use_floppy,
use_cdrom, use_sdcard.  No functional change.

Boards can suppress default floppy, CD-ROM and SD card, but it takes
explicit initializers.  Most boards lack them, and end up with unused
(and useless) default drives.

This commit flips the sense of these flags, so that boards need
explicit initializers to get default drives.  This should make it
harder to screw up there.

The next few commits will clean up the existing unused default drives.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/alpha_dp264.c              |  3 +++
 hw/an5206.c                   |  3 +++
 hw/axis_dev88.c               |  3 +++
 hw/boards.h                   |  6 +++---
 hw/collie.c                   |  3 +++
 hw/dummy_m68k.c               |  3 +++
 hw/exynos4_boards.c           |  6 ++++++
 hw/gumstix.c                  |  6 ++++++
 hw/highbank.c                 |  3 +++
 hw/integratorcp.c             |  3 +++
 hw/kzm.c                      |  3 +++
 hw/leon3.c                    |  3 +++
 hw/lm32_boards.c              |  6 ++++++
 hw/mainstone.c                |  3 +++
 hw/mcf5208.c                  |  3 +++
 hw/milkymist.c                |  3 +++
 hw/mips_fulong2e.c            |  3 +++
 hw/mips_jazz.c                |  6 ++++++
 hw/mips_malta.c               |  3 +++
 hw/mips_mipssim.c             |  3 +++
 hw/mips_r4k.c                 |  3 +++
 hw/musicpal.c                 |  3 +++
 hw/nseries.c                  |  6 ++++++
 hw/omap_sx1.c                 |  6 ++++++
 hw/openrisc_sim.c             |  3 +++
 hw/palm.c                     |  3 +++
 hw/pc_piix.c                  | 33 +++++++++++++++++++++++++++++++++
 hw/petalogix_ml605_mmu.c      |  3 +++
 hw/petalogix_s3adsp1800_mmu.c |  3 +++
 hw/ppc405_boards.c            |  6 ++++++
 hw/ppc440_bamboo.c            |  3 +++
 hw/ppc_newworld.c             |  3 +++
 hw/ppc_oldworld.c             |  3 +++
 hw/ppc_prep.c                 |  3 +++
 hw/ppce500_mpc8544ds.c        |  3 +++
 hw/puv3.c                     |  3 +++
 hw/r2d.c                      |  3 +++
 hw/realview.c                 | 12 ++++++++++++
 hw/s390-virtio.c              |  3 ---
 hw/shix.c                     |  3 +++
 hw/spapr.c                    |  3 +++
 hw/spitz.c                    | 12 ++++++++++++
 hw/stellaris.c                |  6 ++++++
 hw/sun4m.c                    | 36 ++++++++++++++++++++++++++++++++++++
 hw/sun4u.c                    |  9 +++++++++
 hw/tosa.c                     |  3 +++
 hw/versatilepb.c              |  6 ++++++
 hw/vexpress.c                 |  6 ++++++
 hw/virtex_ml507.c             |  3 +++
 hw/xen_machine_pv.c           |  3 +++
 hw/xilinx_zynq.c              |  3 ++-
 hw/xtensa_lx60.c              |  6 ++++++
 hw/xtensa_sim.c               |  3 +++
 hw/z2.c                       |  3 +++
 vl.c                          |  6 +++---
 55 files changed, 281 insertions(+), 10 deletions(-)

Patch

diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c
index 9eb939f..06661e3 100644
--- a/hw/alpha_dp264.c
+++ b/hw/alpha_dp264.c
@@ -169,6 +169,9 @@  static QEMUMachine clipper_machine = {
     .desc = "Alpha DP264/CLIPPER",
     .init = clipper_init,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
diff --git a/hw/an5206.c b/hw/an5206.c
index 25407c0..4a0aebb 100644
--- a/hw/an5206.c
+++ b/hw/an5206.c
@@ -86,6 +86,9 @@  static QEMUMachine an5206_machine = {
     .name = "an5206",
     .desc = "Arnewsh 5206",
     .init = an5206_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void an5206_machine_init(void)
diff --git a/hw/axis_dev88.c b/hw/axis_dev88.c
index eab6327..982b921 100644
--- a/hw/axis_dev88.c
+++ b/hw/axis_dev88.c
@@ -353,6 +353,9 @@  static QEMUMachine axisdev88_machine = {
     .name = "axis-dev88",
     .desc = "AXIS devboard 88",
     .init = axisdev88_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
diff --git a/hw/boards.h b/hw/boards.h
index 59c01d0..61d4239 100644
--- a/hw/boards.h
+++ b/hw/boards.h
@@ -22,9 +22,9 @@  typedef struct QEMUMachine {
     unsigned int no_serial:1,
         no_parallel:1,
         use_virtcon:1,
-        no_floppy:1,
-        no_cdrom:1,
-        no_sdcard:1;
+        use_floppy:1,
+        use_cdrom:1,
+        use_sdcard:1;
     int is_default;
     const char *default_machine_opts;
     GlobalProperty *compat_props;
diff --git a/hw/collie.c b/hw/collie.c
index 56f89a9..8c0fecd 100644
--- a/hw/collie.c
+++ b/hw/collie.c
@@ -61,6 +61,9 @@  static QEMUMachine collie_machine = {
     .name = "collie",
     .desc = "Collie PDA (SA-1110)",
     .init = collie_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void collie_machine_init(void)
diff --git a/hw/dummy_m68k.c b/hw/dummy_m68k.c
index 7cc7a99..1f42a13 100644
--- a/hw/dummy_m68k.c
+++ b/hw/dummy_m68k.c
@@ -73,6 +73,9 @@  static QEMUMachine dummy_m68k_machine = {
     .name = "dummy",
     .desc = "Dummy board",
     .init = dummy_m68k_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void dummy_m68k_machine_init(void)
diff --git a/hw/exynos4_boards.c b/hw/exynos4_boards.c
index 4bb0a60..8daff43 100644
--- a/hw/exynos4_boards.c
+++ b/hw/exynos4_boards.c
@@ -160,12 +160,18 @@  static QEMUMachine exynos4_machines[EXYNOS4_NUM_OF_BOARDS] = {
         .desc = "Samsung NURI board (Exynos4210)",
         .init = nuri_init,
         .max_cpus = EXYNOS4210_NCPUS,
+        .use_floppy = 1,
+        .use_cdrom = 1,
+        .use_sdcard = 1,
     },
     [EXYNOS4_BOARD_SMDKC210] = {
         .name = "smdkc210",
         .desc = "Samsung SMDKC210 board (Exynos4210)",
         .init = smdkc210_init,
         .max_cpus = EXYNOS4210_NCPUS,
+        .use_floppy = 1,
+        .use_cdrom = 1,
+        .use_sdcard = 1,
     },
 };
 
diff --git a/hw/gumstix.c b/hw/gumstix.c
index 13a36ea..955acfe 100644
--- a/hw/gumstix.c
+++ b/hw/gumstix.c
@@ -127,12 +127,18 @@  static QEMUMachine connex_machine = {
     .name = "connex",
     .desc = "Gumstix Connex (PXA255)",
     .init = connex_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine verdex_machine = {
     .name = "verdex",
     .desc = "Gumstix Verdex (PXA270)",
     .init = verdex_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void gumstix_machine_init(void)
diff --git a/hw/highbank.c b/hw/highbank.c
index 11aa131..c1b404b 100644
--- a/hw/highbank.c
+++ b/hw/highbank.c
@@ -326,6 +326,9 @@  static QEMUMachine highbank_machine = {
     .init = highbank_init,
     .use_scsi = 1,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void highbank_machine_init(void)
diff --git a/hw/integratorcp.c b/hw/integratorcp.c
index d0e2e90..b152cc7 100644
--- a/hw/integratorcp.c
+++ b/hw/integratorcp.c
@@ -509,6 +509,9 @@  static QEMUMachine integratorcp_machine = {
     .name = "integratorcp",
     .desc = "ARM Integrator/CP (ARM926EJ-S)",
     .init = integratorcp_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
diff --git a/hw/kzm.c b/hw/kzm.c
index 6a5e9df..a471048 100644
--- a/hw/kzm.c
+++ b/hw/kzm.c
@@ -144,6 +144,9 @@  static QEMUMachine kzm_machine = {
     .name = "kzm",
     .desc = "ARM KZM Emulation Baseboard (ARM1136)",
     .init = kzm_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void kzm_machine_init(void)
diff --git a/hw/leon3.c b/hw/leon3.c
index 7a9729d..aa67e1a 100644
--- a/hw/leon3.c
+++ b/hw/leon3.c
@@ -215,6 +215,9 @@  static QEMUMachine leon3_generic_machine = {
     .desc     = "Leon-3 generic",
     .init     = leon3_generic_hw_init,
     .use_scsi = 0,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void leon3_machine_init(void)
diff --git a/hw/lm32_boards.c b/hw/lm32_boards.c
index b76d800..3ed984d 100644
--- a/hw/lm32_boards.c
+++ b/hw/lm32_boards.c
@@ -290,6 +290,9 @@  static QEMUMachine lm32_evr_machine = {
     .name = "lm32-evr",
     .desc = "LatticeMico32 EVR32 eval system",
     .init = lm32_evr_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1
 };
 
@@ -297,6 +300,9 @@  static QEMUMachine lm32_uclinux_machine = {
     .name = "lm32-uclinux",
     .desc = "lm32 platform for uClinux and u-boot by Theobroma Systems",
     .init = lm32_uclinux_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 0
 };
 
diff --git a/hw/mainstone.c b/hw/mainstone.c
index 97687b6..29b24ac 100644
--- a/hw/mainstone.c
+++ b/hw/mainstone.c
@@ -184,6 +184,9 @@  static QEMUMachine mainstone2_machine = {
     .name = "mainstone",
     .desc = "Mainstone II (PXA27x)",
     .init = mainstone_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void mainstone_machine_init(void)
diff --git a/hw/mcf5208.c b/hw/mcf5208.c
index ee25b1b..cc7afba 100644
--- a/hw/mcf5208.c
+++ b/hw/mcf5208.c
@@ -291,6 +291,9 @@  static QEMUMachine mcf5208evb_machine = {
     .name = "mcf5208evb",
     .desc = "MCF5206EVB",
     .init = mcf5208evb_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
diff --git a/hw/milkymist.c b/hw/milkymist.c
index 2e7235b..194d3b5 100644
--- a/hw/milkymist.c
+++ b/hw/milkymist.c
@@ -207,6 +207,9 @@  static QEMUMachine milkymist_machine = {
     .name = "milkymist",
     .desc = "Milkymist One",
     .init = milkymist_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 0
 };
 
diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c
index d4a8672..702ec6a 100644
--- a/hw/mips_fulong2e.c
+++ b/hw/mips_fulong2e.c
@@ -396,6 +396,9 @@  static QEMUMachine mips_fulong2e_machine = {
     .name = "fulong2e",
     .desc = "Fulong 2e mini pc",
     .init = mips_fulong2e_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void mips_fulong2e_machine_init(void)
diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
index db927f1..0e203cb 100644
--- a/hw/mips_jazz.c
+++ b/hw/mips_jazz.c
@@ -326,6 +326,9 @@  static QEMUMachine mips_magnum_machine = {
     .desc = "MIPS Magnum",
     .init = mips_magnum_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine mips_pica61_machine = {
@@ -333,6 +336,9 @@  static QEMUMachine mips_pica61_machine = {
     .desc = "Acer Pica 61",
     .init = mips_pica61_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void mips_jazz_machine_init(void)
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index 351c88e..f86d977 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -1019,6 +1019,9 @@  static QEMUMachine mips_malta_machine = {
     .desc = "MIPS Malta Core LV",
     .init = mips_malta_init,
     .max_cpus = 16,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c
index 830f635..8e97790 100644
--- a/hw/mips_mipssim.c
+++ b/hw/mips_mipssim.c
@@ -226,6 +226,9 @@  static QEMUMachine mips_mipssim_machine = {
     .name = "mipssim",
     .desc = "MIPS MIPSsim platform",
     .init = mips_mipssim_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void mips_mipssim_machine_init(void)
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c
index 967a76e..f7adfdc 100644
--- a/hw/mips_r4k.c
+++ b/hw/mips_r4k.c
@@ -299,6 +299,9 @@  static QEMUMachine mips_machine = {
     .name = "mips",
     .desc = "mips r4k platform",
     .init = mips_r4k_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void mips_machine_init(void)
diff --git a/hw/musicpal.c b/hw/musicpal.c
index ad725b5..3861056 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -1658,6 +1658,9 @@  static QEMUMachine musicpal_machine = {
     .name = "musicpal",
     .desc = "Marvell 88w8618 / MusicPal (ARM926EJ-S)",
     .init = musicpal_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void musicpal_machine_init(void)
diff --git a/hw/nseries.c b/hw/nseries.c
index 4df2670..dfa158c 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -1409,12 +1409,18 @@  static QEMUMachine n800_machine = {
     .name = "n800",
     .desc = "Nokia N800 tablet aka. RX-34 (OMAP2420)",
     .init = n800_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine n810_machine = {
     .name = "n810",
     .desc = "Nokia N810 tablet aka. RX-44 (OMAP2420)",
     .init = n810_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void nseries_machine_init(void)
diff --git a/hw/omap_sx1.c b/hw/omap_sx1.c
index abca341..a5d7b85 100644
--- a/hw/omap_sx1.c
+++ b/hw/omap_sx1.c
@@ -231,12 +231,18 @@  static QEMUMachine sx1_machine_v2 = {
     .name = "sx1",
     .desc = "Siemens SX1 (OMAP310) V2",
     .init = sx1_init_v2,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine sx1_machine_v1 = {
     .name = "sx1-v1",
     .desc = "Siemens SX1 (OMAP310) V1",
     .init = sx1_init_v1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void sx1_machine_init(void)
diff --git a/hw/openrisc_sim.c b/hw/openrisc_sim.c
index 55e97f0..2b77846 100644
--- a/hw/openrisc_sim.c
+++ b/hw/openrisc_sim.c
@@ -139,6 +139,9 @@  static QEMUMachine openrisc_sim_machine = {
     .desc = "or32 simulation",
     .init = openrisc_sim_init,
     .max_cpus = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
diff --git a/hw/palm.c b/hw/palm.c
index bacdc90..50c53dd 100644
--- a/hw/palm.c
+++ b/hw/palm.c
@@ -279,6 +279,9 @@  static QEMUMachine palmte_machine = {
     .name = "cheetah",
     .desc = "Palm Tungsten|E aka. Cheetah PDA (OMAP310)",
     .init = palmte_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void palmte_machine_init(void)
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 0c0096f..9374198 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -355,6 +355,9 @@  static QEMUMachine pc_machine_v1_2 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
@@ -382,6 +385,9 @@  static QEMUMachine pc_machine_v1_1 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_1_1,
         { /* end of list */ }
@@ -417,6 +423,9 @@  static QEMUMachine pc_machine_v1_0 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_1_0,
         { /* end of list */ }
@@ -432,6 +441,9 @@  static QEMUMachine pc_machine_v0_15 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_15,
         { /* end of list */ }
@@ -464,6 +476,9 @@  static QEMUMachine pc_machine_v0_14 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_14, 
         {
@@ -497,6 +512,9 @@  static QEMUMachine pc_machine_v0_13 = {
     .desc = "Standard PC",
     .init = pc_init_pci_no_kvmclock,
     .max_cpus = 255,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_13,
         {
@@ -534,6 +552,9 @@  static QEMUMachine pc_machine_v0_12 = {
     .desc = "Standard PC",
     .init = pc_init_pci_no_kvmclock,
     .max_cpus = 255,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_12,
         {
@@ -567,6 +588,9 @@  static QEMUMachine pc_machine_v0_11 = {
     .desc = "Standard PC, qemu 0.11",
     .init = pc_init_pci_no_kvmclock,
     .max_cpus = 255,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_11,
         {
@@ -588,6 +612,9 @@  static QEMUMachine pc_machine_v0_10 = {
     .desc = "Standard PC, qemu 0.10",
     .init = pc_init_pci_no_kvmclock,
     .max_cpus = 255,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_11,
         {
@@ -621,6 +648,9 @@  static QEMUMachine isapc_machine = {
     .desc = "ISA-only PC",
     .init = pc_init_isa,
     .max_cpus = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .compat_props = (GlobalProperty[]) {
         {
             .driver   = "pc-sysfw",
@@ -637,6 +667,9 @@  static QEMUMachine xenfv_machine = {
     .desc = "Xen Fully-virtualized PC",
     .init = pc_xen_hvm_init,
     .max_cpus = HVM_MAX_VCPUS,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .default_machine_opts = "accel=xen",
 };
 #endif
diff --git a/hw/petalogix_ml605_mmu.c b/hw/petalogix_ml605_mmu.c
index dced648..7703d54 100644
--- a/hw/petalogix_ml605_mmu.c
+++ b/hw/petalogix_ml605_mmu.c
@@ -148,6 +148,9 @@  static QEMUMachine petalogix_ml605_machine = {
     .name = "petalogix-ml605",
     .desc = "PetaLogix linux refdesign for xilinx ml605 little endian",
     .init = petalogix_ml605_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 0
 };
 
diff --git a/hw/petalogix_s3adsp1800_mmu.c b/hw/petalogix_s3adsp1800_mmu.c
index 2cf6882..d534c07 100644
--- a/hw/petalogix_s3adsp1800_mmu.c
+++ b/hw/petalogix_s3adsp1800_mmu.c
@@ -117,6 +117,9 @@  static QEMUMachine petalogix_s3adsp1800_machine = {
     .name = "petalogix-s3adsp1800",
     .desc = "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800",
     .init = petalogix_s3adsp1800_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1
 };
 
diff --git a/hw/ppc405_boards.c b/hw/ppc405_boards.c
index 476775d..8c5af01 100644
--- a/hw/ppc405_boards.c
+++ b/hw/ppc405_boards.c
@@ -363,6 +363,9 @@  static QEMUMachine ref405ep_machine = {
     .name = "ref405ep",
     .desc = "ref405ep",
     .init = ref405ep_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 /*****************************************************************************/
@@ -652,6 +655,9 @@  static QEMUMachine taihu_machine = {
     .name = "taihu",
     .desc = "taihu",
     .init = taihu_405ep_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void ppc405_machine_init(void)
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
index 0dd4dab..4b9a1e5 100644
--- a/hw/ppc440_bamboo.c
+++ b/hw/ppc440_bamboo.c
@@ -294,6 +294,9 @@  static QEMUMachine bamboo_machine = {
     .name = "bamboo",
     .desc = "bamboo",
     .init = bamboo_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void bamboo_machine_init(void)
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index 4e2a6e6..f7197d3 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -423,6 +423,9 @@  static QEMUMachine core99_machine = {
     .desc = "Mac99 based PowerMAC",
     .init = ppc_core99_init,
     .max_cpus = MAX_CPUS,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 #ifdef TARGET_PPC64
     .is_default = 1,
 #endif
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index f2c6908..9f56b73 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -338,6 +338,9 @@  static QEMUMachine heathrow_machine = {
     .desc = "Heathrow based PowerMAC",
     .init = ppc_heathrow_init,
     .max_cpus = MAX_CPUS,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 #ifndef TARGET_PPC64
     .is_default = 1,
 #endif
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index be2b268..d8b3441 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -694,6 +694,9 @@  static QEMUMachine prep_machine = {
     .desc = "PowerPC PREP platform",
     .init = ppc_prep_init,
     .max_cpus = MAX_CPUS,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void prep_machine_init(void)
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
index 8b9fd83..1e5801e 100644
--- a/hw/ppce500_mpc8544ds.c
+++ b/hw/ppce500_mpc8544ds.c
@@ -600,6 +600,9 @@  static QEMUMachine mpc8544ds_machine = {
     .desc = "mpc8544ds",
     .init = mpc8544ds_init,
     .max_cpus = 15,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void mpc8544ds_machine_init(void)
diff --git a/hw/puv3.c b/hw/puv3.c
index 8aad17f..bf03336 100644
--- a/hw/puv3.c
+++ b/hw/puv3.c
@@ -124,6 +124,9 @@  static QEMUMachine puv3_machine = {
     .name = "puv3",
     .desc = "PKUnity Version-3 based on UniCore32",
     .init = puv3_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
     .use_scsi = 0,
 };
diff --git a/hw/r2d.c b/hw/r2d.c
index 0f16e81..e4812ea 100644
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -344,6 +344,9 @@  static QEMUMachine r2d_machine = {
     .name = "r2d",
     .desc = "r2d-plus board",
     .init = r2d_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void r2d_machine_init(void)
diff --git a/hw/realview.c b/hw/realview.c
index 19db4d0..a91f35f 100644
--- a/hw/realview.c
+++ b/hw/realview.c
@@ -383,6 +383,9 @@  static QEMUMachine realview_eb_machine = {
     .desc = "ARM RealView Emulation Baseboard (ARM926EJ-S)",
     .init = realview_eb_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine realview_eb_mpcore_machine = {
@@ -391,12 +394,18 @@  static QEMUMachine realview_eb_mpcore_machine = {
     .init = realview_eb_mpcore_init,
     .use_scsi = 1,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine realview_pb_a8_machine = {
     .name = "realview-pb-a8",
     .desc = "ARM RealView Platform Baseboard for Cortex-A8",
     .init = realview_pb_a8_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine realview_pbx_a9_machine = {
@@ -405,6 +414,9 @@  static QEMUMachine realview_pbx_a9_machine = {
     .init = realview_pbx_a9_init,
     .use_scsi = 1,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void realview_machine_init(void)
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 47eed35..b10fba2 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -334,11 +334,8 @@  static QEMUMachine s390_machine = {
     .alias = "s390",
     .desc = "VirtIO based S390 machine",
     .init = s390_init,
-    .no_cdrom = 1,
-    .no_floppy = 1,
     .no_serial = 1,
     .no_parallel = 1,
-    .no_sdcard = 1,
     .use_virtcon = 1,
     .max_cpus = 255,
     .is_default = 1,
diff --git a/hw/shix.c b/hw/shix.c
index dd9ce17..0f2a7c7 100644
--- a/hw/shix.c
+++ b/hw/shix.c
@@ -93,6 +93,9 @@  static QEMUMachine shix_machine = {
     .name = "shix",
     .desc = "shix card",
     .init = shix_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
diff --git a/hw/spapr.c b/hw/spapr.c
index 81c9343..a744451 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -800,6 +800,9 @@  static QEMUMachine spapr_machine = {
     .max_cpus = MAX_CPUS,
     .no_parallel = 1,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void spapr_machine_init(void)
diff --git a/hw/spitz.c b/hw/spitz.c
index 20e7835..addd1c8 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -976,24 +976,36 @@  static QEMUMachine akitapda_machine = {
     .name = "akita",
     .desc = "Akita PDA (PXA270)",
     .init = akita_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine spitzpda_machine = {
     .name = "spitz",
     .desc = "Spitz PDA (PXA270)",
     .init = spitz_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine borzoipda_machine = {
     .name = "borzoi",
     .desc = "Borzoi PDA (PXA270)",
     .init = borzoi_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine terrierpda_machine = {
     .name = "terrier",
     .desc = "Terrier PDA (PXA270)",
     .init = terrier_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void spitz_machine_init(void)
diff --git a/hw/stellaris.c b/hw/stellaris.c
index 562fbbf..7e65517 100644
--- a/hw/stellaris.c
+++ b/hw/stellaris.c
@@ -1378,12 +1378,18 @@  static QEMUMachine lm3s811evb_machine = {
     .name = "lm3s811evb",
     .desc = "Stellaris LM3S811EVB",
     .init = lm3s811evb_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine lm3s6965evb_machine = {
     .name = "lm3s6965evb",
     .desc = "Stellaris LM3S6965EVB",
     .init = lm3s6965evb_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void stellaris_machine_init(void)
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 0f909b5..4d260c1 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -1386,6 +1386,9 @@  static QEMUMachine ss5_machine = {
     .desc = "Sun4m platform, SPARCstation 5",
     .init = ss5_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
@@ -1395,6 +1398,9 @@  static QEMUMachine ss10_machine = {
     .init = ss10_init,
     .use_scsi = 1,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine ss600mp_machine = {
@@ -1403,6 +1409,9 @@  static QEMUMachine ss600mp_machine = {
     .init = ss600mp_init,
     .use_scsi = 1,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine ss20_machine = {
@@ -1411,6 +1420,9 @@  static QEMUMachine ss20_machine = {
     .init = ss20_init,
     .use_scsi = 1,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine voyager_machine = {
@@ -1418,6 +1430,9 @@  static QEMUMachine voyager_machine = {
     .desc = "Sun4m platform, SPARCstation Voyager",
     .init = vger_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine ss_lx_machine = {
@@ -1425,6 +1440,9 @@  static QEMUMachine ss_lx_machine = {
     .desc = "Sun4m platform, SPARCstation LX",
     .init = ss_lx_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine ss4_machine = {
@@ -1432,6 +1450,9 @@  static QEMUMachine ss4_machine = {
     .desc = "Sun4m platform, SPARCstation 4",
     .init = ss4_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine scls_machine = {
@@ -1439,6 +1460,9 @@  static QEMUMachine scls_machine = {
     .desc = "Sun4m platform, SPARCClassic",
     .init = scls_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine sbook_machine = {
@@ -1446,6 +1470,9 @@  static QEMUMachine sbook_machine = {
     .desc = "Sun4m platform, SPARCbook",
     .init = sbook_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static const struct sun4d_hwdef sun4d_hwdefs[] = {
@@ -1664,6 +1691,9 @@  static QEMUMachine ss1000_machine = {
     .init = ss1000_init,
     .use_scsi = 1,
     .max_cpus = 8,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine ss2000_machine = {
@@ -1672,6 +1702,9 @@  static QEMUMachine ss2000_machine = {
     .init = ss2000_init,
     .use_scsi = 1,
     .max_cpus = 20,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static const struct sun4c_hwdef sun4c_hwdefs[] = {
@@ -1847,6 +1880,9 @@  static QEMUMachine ss2_machine = {
     .desc = "Sun4c platform, SPARCstation 2",
     .init = ss2_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void sun4m_register_types(void)
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 137a7c6..e6d1132 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -963,6 +963,9 @@  static QEMUMachine sun4u_machine = {
     .desc = "Sun4u platform",
     .init = sun4u_init,
     .max_cpus = 1, // XXX for now
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .is_default = 1,
 };
 
@@ -971,6 +974,9 @@  static QEMUMachine sun4v_machine = {
     .desc = "Sun4v platform",
     .init = sun4v_init,
     .max_cpus = 1, // XXX for now
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine niagara_machine = {
@@ -978,6 +984,9 @@  static QEMUMachine niagara_machine = {
     .desc = "Sun4v platform, Niagara",
     .init = niagara_init,
     .max_cpus = 1, // XXX for now
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void sun4u_register_types(void)
diff --git a/hw/tosa.c b/hw/tosa.c
index 297a8c2..59629a2 100644
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -250,6 +250,9 @@  static QEMUMachine tosapda_machine = {
     .name = "tosa",
     .desc = "Tosa PDA (PXA255)",
     .init = tosa_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void tosapda_machine_init(void)
diff --git a/hw/versatilepb.c b/hw/versatilepb.c
index 4fd5d9b..38c4982 100644
--- a/hw/versatilepb.c
+++ b/hw/versatilepb.c
@@ -369,6 +369,9 @@  static QEMUMachine versatilepb_machine = {
     .desc = "ARM Versatile/PB (ARM926EJ-S)",
     .init = vpb_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine versatileab_machine = {
@@ -376,6 +379,9 @@  static QEMUMachine versatileab_machine = {
     .desc = "ARM Versatile/AB (ARM926EJ-S)",
     .init = vab_init,
     .use_scsi = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void versatile_machine_init(void)
diff --git a/hw/vexpress.c b/hw/vexpress.c
index b615844..3f01654 100644
--- a/hw/vexpress.c
+++ b/hw/vexpress.c
@@ -478,6 +478,9 @@  static QEMUMachine vexpress_a9_machine = {
     .init = vexpress_a9_init,
     .use_scsi = 1,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine vexpress_a15_machine = {
@@ -486,6 +489,9 @@  static QEMUMachine vexpress_a15_machine = {
     .init = vexpress_a15_init,
     .use_scsi = 1,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void vexpress_machine_init(void)
diff --git a/hw/virtex_ml507.c b/hw/virtex_ml507.c
index 79bc0d1..a1d71f5 100644
--- a/hw/virtex_ml507.c
+++ b/hw/virtex_ml507.c
@@ -264,6 +264,9 @@  static QEMUMachine virtex_machine = {
     .name = "virtex-ml507",
     .desc = "Xilinx Virtex ML507 reference design",
     .init = virtex_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void virtex_machine_init(void)
diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c
index 4b72aa7..f3660fa 100644
--- a/hw/xen_machine_pv.c
+++ b/hw/xen_machine_pv.c
@@ -115,6 +115,9 @@  static QEMUMachine xenpv_machine = {
     .desc = "Xen Para-virtualized PC",
     .init = xen_init_pv,
     .max_cpus = 1,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
     .default_machine_opts = "accel=xen",
 };
 
diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c
index 7e6c273..1f16a34 100644
--- a/hw/xilinx_zynq.c
+++ b/hw/xilinx_zynq.c
@@ -146,7 +146,8 @@  static QEMUMachine zynq_machine = {
     .init = zynq_init,
     .use_scsi = 1,
     .max_cpus = 1,
-    .no_sdcard = 1
+    .use_floppy = 1,
+    .use_cdrom = 1,
 };
 
 static void zynq_machine_init(void)
diff --git a/hw/xtensa_lx60.c b/hw/xtensa_lx60.c
index 3653f65..7276e08 100644
--- a/hw/xtensa_lx60.c
+++ b/hw/xtensa_lx60.c
@@ -303,6 +303,9 @@  static QEMUMachine xtensa_lx60_machine = {
     .desc = "lx60 EVB (" XTENSA_DEFAULT_CPU_MODEL ")",
     .init = xtensa_lx60_init,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static QEMUMachine xtensa_lx200_machine = {
@@ -310,6 +313,9 @@  static QEMUMachine xtensa_lx200_machine = {
     .desc = "lx200 EVB (" XTENSA_DEFAULT_CPU_MODEL ")",
     .init = xtensa_lx200_init,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void xtensa_lx_machines_init(void)
diff --git a/hw/xtensa_sim.c b/hw/xtensa_sim.c
index 831460b..1b14d1f 100644
--- a/hw/xtensa_sim.c
+++ b/hw/xtensa_sim.c
@@ -114,6 +114,9 @@  static QEMUMachine xtensa_sim_machine = {
     .is_default = true,
     .init = xtensa_sim_init,
     .max_cpus = 4,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void xtensa_sim_machine_init(void)
diff --git a/hw/z2.c b/hw/z2.c
index 289cee9..97cf093 100644
--- a/hw/z2.c
+++ b/hw/z2.c
@@ -371,6 +371,9 @@  static QEMUMachine z2_machine = {
     .name = "z2",
     .desc = "Zipit Z2 (PXA27x)",
     .init = z2_init,
+    .use_floppy = 1,
+    .use_cdrom = 1,
+    .use_sdcard = 1,
 };
 
 static void z2_machine_init(void)
diff --git a/vl.c b/vl.c
index d01256a..05b618d 100644
--- a/vl.c
+++ b/vl.c
@@ -3337,13 +3337,13 @@  int main(int argc, char **argv, char **envp)
     if (!machine->use_virtcon) {
         default_virtcon = 0;
     }
-    if (machine->no_floppy) {
+    if (!machine->use_floppy) {
         default_floppy = 0;
     }
-    if (machine->no_cdrom) {
+    if (!machine->use_cdrom) {
         default_cdrom = 0;
     }
-    if (machine->no_sdcard) {
+    if (!machine->use_sdcard) {
         default_sdcard = 0;
     }