Make default boot order machine specific
authorAvik Sil <aviksil@linux.vnet.ibm.com>
Tue, 8 Jan 2013 07:06:30 +0000 (12:36 +0530)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 16 Jan 2013 00:26:18 +0000 (18:26 -0600)
This patch makes default boot order machine specific instead of
set globally. The default boot order can be set per machine in
QEMUMachine boot_order. This also allows a machine to receive a
NULL boot order when -boot isn't used and take an appropriate action
accordingly. This helps machine boots from the devices as set in
guest's non-volatile memory location in case no boot order is
provided by the user.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
57 files changed:
hw/alpha_dp264.c
hw/an5206.c
hw/axis_dev88.c
hw/boards.h
hw/collie.c
hw/dummy_m68k.c
hw/exynos4_boards.c
hw/gumstix.c
hw/highbank.c
hw/integratorcp.c
hw/kzm.c
hw/leon3.c
hw/lm32_boards.c
hw/mainstone.c
hw/mcf5208.c
hw/milkymist.c
hw/mips_fulong2e.c
hw/mips_jazz.c
hw/mips_malta.c
hw/mips_mipssim.c
hw/mips_r4k.c
hw/musicpal.c
hw/nseries.c
hw/null-machine.c
hw/omap_sx1.c
hw/openrisc_sim.c
hw/palm.c
hw/pc_piix.c
hw/petalogix_ml605_mmu.c
hw/petalogix_s3adsp1800_mmu.c
hw/ppc/e500plat.c
hw/ppc/mpc8544ds.c
hw/ppc405_boards.c
hw/ppc440_bamboo.c
hw/ppc_newworld.c
hw/ppc_oldworld.c
hw/ppc_prep.c
hw/puv3.c
hw/r2d.c
hw/realview.c
hw/s390-virtio.c
hw/shix.c
hw/spapr.c
hw/spitz.c
hw/stellaris.c
hw/sun4m.c
hw/sun4u.c
hw/tosa.c
hw/versatilepb.c
hw/vexpress.c
hw/virtex_ml507.c
hw/xen_machine_pv.c
hw/xilinx_zynq.c
hw/xtensa_lx60.c
hw/xtensa_sim.c
hw/z2.c
vl.c

index e2980e989370ea5ef30626fc0cf0673c7fb60f20..1cd549c69fab9bf1ecb715b917b281216cff36f9 100644 (file)
@@ -171,6 +171,7 @@ static QEMUMachine clipper_machine = {
     .init = clipper_init,
     .max_cpus = 4,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void clipper_machine_init(void)
index dcfe34b3ae2d3e140b5739b24810dc0b5e9635d1..750115a3aaf0e71ba501b5454fc630b32a82b825 100644 (file)
@@ -86,6 +86,7 @@ static QEMUMachine an5206_machine = {
     .name = "an5206",
     .desc = "Arnewsh 5206",
     .init = an5206_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void an5206_machine_init(void)
index 2ca606b835eab695f74301832811395c6c99fbf8..941898158c9fcbf4b85a2b2f5a8ee4ded86fe080 100644 (file)
@@ -355,6 +355,7 @@ static QEMUMachine axisdev88_machine = {
     .desc = "AXIS devboard 88",
     .init = axisdev88_init,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void axisdev88_machine_init(void)
index 4540e952f7b9e98fd95a0fb2a8896c035c485582..3ff9665b1f0aef632cabf8c63fa1e60c2694886f 100644 (file)
@@ -6,6 +6,9 @@
 #include "sysemu/blockdev.h"
 #include "qdev.h"
 
+#define DEFAULT_MACHINE_OPTIONS \
+    .boot_order = "cad"
+
 typedef struct QEMUMachineInitArgs {
     ram_addr_t ram_size;
     const char *boot_device;
@@ -35,6 +38,7 @@ typedef struct QEMUMachine {
         no_sdcard:1;
     int is_default;
     const char *default_machine_opts;
+    const char *boot_order;
     GlobalProperty *compat_props;
     struct QEMUMachine *next;
     const char *hw_version;
index 804d61a421da0a6288791b8730b4e5fe2e6c9efe..d19db590febf8189681e15de72b15a0628b0fe5c 100644 (file)
@@ -62,6 +62,7 @@ static QEMUMachine collie_machine = {
     .name = "collie",
     .desc = "Collie PDA (SA-1110)",
     .init = collie_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void collie_machine_init(void)
index 7878cc3e15559eb76888466b916f67b16b0f71ba..3a88805d0f0ea5e92bcfad0839b87b2919a4d1f5 100644 (file)
@@ -73,6 +73,7 @@ static QEMUMachine dummy_m68k_machine = {
     .name = "dummy",
     .desc = "Dummy board",
     .init = dummy_m68k_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void dummy_m68k_machine_init(void)
index b26796847b540377ec2353341b61a3948173695c..968bcc3c328d72a82b92790f67ee0ec672d83f12 100644 (file)
@@ -150,12 +150,14 @@ static QEMUMachine exynos4_machines[EXYNOS4_NUM_OF_BOARDS] = {
         .desc = "Samsung NURI board (Exynos4210)",
         .init = nuri_init,
         .max_cpus = EXYNOS4210_NCPUS,
+        DEFAULT_MACHINE_OPTIONS,
     },
     [EXYNOS4_BOARD_SMDKC210] = {
         .name = "smdkc210",
         .desc = "Samsung SMDKC210 board (Exynos4210)",
         .init = smdkc210_init,
         .max_cpus = EXYNOS4210_NCPUS,
+        DEFAULT_MACHINE_OPTIONS,
     },
 };
 
index 6fb068386c029ca073ec5c96b625dce415ef7082..bea16058f713771f29c804c9964c26a01c565a14 100644 (file)
@@ -122,12 +122,14 @@ static QEMUMachine connex_machine = {
     .name = "connex",
     .desc = "Gumstix Connex (PXA255)",
     .init = connex_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine verdex_machine = {
     .name = "verdex",
     .desc = "Gumstix Verdex (PXA270)",
     .init = verdex_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void gumstix_machine_init(void)
index 98deca8bce97b8b0e9fc35ffc0775ea1b03eb90d..7bc6b444cc0d70f67cf8d087654d643454285f84 100644 (file)
@@ -331,6 +331,7 @@ static QEMUMachine highbank_machine = {
     .init = highbank_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void highbank_machine_init(void)
index 6c824dc36e05584ed1630de5296fa87148ace7fa..9e3630a43de5a02fe65449f74e9d6e688fa748dd 100644 (file)
@@ -512,6 +512,7 @@ static QEMUMachine integratorcp_machine = {
     .desc = "ARM Integrator/CP (ARM926EJ-S)",
     .init = integratorcp_init,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void integratorcp_machine_init(void)
index fd00af921efd557fd259d428996946930eea265a..fb3316551dd03f59dcef1fcd87e47dfc027d9779 100644 (file)
--- a/hw/kzm.c
+++ b/hw/kzm.c
@@ -146,6 +146,7 @@ static QEMUMachine kzm_machine = {
     .name = "kzm",
     .desc = "ARM KZM Emulation Baseboard (ARM1136)",
     .init = kzm_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void kzm_machine_init(void)
index 79b3a41def144c933606b94d965e0237d08ca923..f16a8bb4ece5ed0d4159c748cb19c6c365f810a8 100644 (file)
@@ -212,6 +212,7 @@ static QEMUMachine leon3_generic_machine = {
     .name     = "leon3_generic",
     .desc     = "Leon-3 generic",
     .init     = leon3_generic_hw_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void leon3_machine_init(void)
index 42e8b6b52ab3a393d9a4b7127681028e1d0eae8f..2bc06d7b7b35f4fdcbe812639c26a57bd8ec4863 100644 (file)
@@ -287,14 +287,16 @@ static QEMUMachine lm32_evr_machine = {
     .name = "lm32-evr",
     .desc = "LatticeMico32 EVR32 eval system",
     .init = lm32_evr_init,
-    .is_default = 1
+    .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine lm32_uclinux_machine = {
     .name = "lm32-uclinux",
     .desc = "lm32 platform for uClinux and u-boot by Theobroma Systems",
     .init = lm32_uclinux_init,
-    .is_default = 0
+    .is_default = 0,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void lm32_machine_init(void)
index a5ddbeff9d8b9e8fc0a9da5a7ea44ddb3973dafb..d1ff6e76d6d6268cfb00f665155818dc15ee7cda 100644 (file)
@@ -179,6 +179,7 @@ static QEMUMachine mainstone2_machine = {
     .name = "mainstone",
     .desc = "Mainstone II (PXA27x)",
     .init = mainstone_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void mainstone_machine_init(void)
index c1816cc9d119757efd5f373f63e8244ed925b30d..2c9a5dc98a1783430e11dd8f838a70b482bdc5b9 100644 (file)
@@ -292,6 +292,7 @@ static QEMUMachine mcf5208evb_machine = {
     .desc = "MCF5206EVB",
     .init = mcf5208evb_init,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void mcf5208evb_machine_init(void)
index 0c23b672f3610309055fd376e5096132634faa10..c04eb35fddbe462cf873d66188e38b04cebd6ee6 100644 (file)
@@ -206,7 +206,8 @@ static QEMUMachine milkymist_machine = {
     .name = "milkymist",
     .desc = "Milkymist One",
     .init = milkymist_init,
-    .is_default = 0
+    .is_default = 0,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void milkymist_machine_init(void)
index 4d8ee8c09ca7da92369e5239cbc034187083268e..8b532e1e0dce0433838b81abdea3f51e74db8249 100644 (file)
@@ -400,6 +400,7 @@ static QEMUMachine mips_fulong2e_machine = {
     .name = "fulong2e",
     .desc = "Fulong 2e mini pc",
     .init = mips_fulong2e_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void mips_fulong2e_machine_init(void)
index 63df2a734b56cf6e0e42acbc30f32a101ab088f8..72f70cae52d075b8a3b1dfe166a9149ab8abf4fd 100644 (file)
@@ -325,6 +325,7 @@ static QEMUMachine mips_magnum_machine = {
     .desc = "MIPS Magnum",
     .init = mips_magnum_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine mips_pica61_machine = {
@@ -332,6 +333,7 @@ static QEMUMachine mips_pica61_machine = {
     .desc = "Acer Pica 61",
     .init = mips_pica61_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void mips_jazz_machine_init(void)
index 771d1256d76e3e95ad697d7795a083f666c72132..2a150dfb84d84d68eb091988ff7e5b52a773f796 100644 (file)
@@ -1020,6 +1020,7 @@ static QEMUMachine mips_malta_machine = {
     .init = mips_malta_init,
     .max_cpus = 16,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void mips_malta_register_types(void)
index 67066c0ca11e3b2b03e36d5db5da2187e46e14f7..8fd6692e8253b1ec921aa10a630bad79517db41c 100644 (file)
@@ -229,6 +229,7 @@ static QEMUMachine mips_mipssim_machine = {
     .name = "mipssim",
     .desc = "MIPS MIPSsim platform",
     .init = mips_mipssim_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void mips_mipssim_machine_init(void)
index 59c43e591c098bdad5350a21adfc4539bd321706..5df7eb44696f2ac8c780cd58a785dba778ac4a81 100644 (file)
@@ -302,6 +302,7 @@ static QEMUMachine mips_machine = {
     .name = "mips",
     .desc = "mips r4k platform",
     .init = mips_r4k_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void mips_machine_init(void)
index 24a1722703ecf20f424f1687ba1d32eb5a7c0ff0..035865f0583aa2d70e8455cb65cbb973d6dc9c07 100644 (file)
@@ -1658,6 +1658,7 @@ static QEMUMachine musicpal_machine = {
     .name = "musicpal",
     .desc = "Marvell 88w8618 / MusicPal (ARM926EJ-S)",
     .init = musicpal_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void musicpal_machine_init(void)
index d96b750ccdb28b0177e5cfb11b0ae504f180c48d..6b717cfe1e4db74ab3601c2b81d5c42b2af00b28 100644 (file)
@@ -1411,12 +1411,14 @@ static QEMUMachine n800_machine = {
     .name = "n800",
     .desc = "Nokia N800 tablet aka. RX-34 (OMAP2420)",
     .init = n800_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine n810_machine = {
     .name = "n810",
     .desc = "Nokia N810 tablet aka. RX-44 (OMAP2420)",
     .init = n810_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void nseries_machine_init(void)
index d813c089e7c59ae1a0ed376c47160963c0003996..bdf109fef1ef6b74f0b8831b1d27e244443fd399 100644 (file)
@@ -24,6 +24,7 @@ static QEMUMachine machine_none = {
     .desc = "empty machine",
     .init = machine_none_init,
     .max_cpus = 0,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void register_machines(void)
index 0f031215057e08a91466aef39beabf52e5de0ace..30998c5ff36a5dfbe08f1bc68e788fe199abafa2 100644 (file)
@@ -219,12 +219,14 @@ static QEMUMachine sx1_machine_v2 = {
     .name = "sx1",
     .desc = "Siemens SX1 (OMAP310) V2",
     .init = sx1_init_v2,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine sx1_machine_v1 = {
     .name = "sx1-v1",
     .desc = "Siemens SX1 (OMAP310) V1",
     .init = sx1_init_v1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void sx1_machine_init(void)
index d2b2379ae20c40b79ae77691684bd21272ba0ae9..fb47cdc82dd2f8504e742f9768fe988bc3cbac7f 100644 (file)
@@ -139,6 +139,7 @@ static QEMUMachine openrisc_sim_machine = {
     .init = openrisc_sim_init,
     .max_cpus = 1,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void openrisc_sim_machine_init(void)
index 5219e37394855fa4033c67a03ed1217c4420aa07..a633dfc4b17a8012363328f813ef8b7b5d128716 100644 (file)
--- a/hw/palm.c
+++ b/hw/palm.c
@@ -280,6 +280,7 @@ static QEMUMachine palmte_machine = {
     .name = "cheetah",
     .desc = "Palm Tungsten|E aka. Cheetah PDA (OMAP310)",
     .init = palmte_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void palmte_machine_init(void)
index e630aeab9de2db28b2d131a3c7e6e5ef0361338c..0a6923dcef10934c24660357608cf4a1ff8c893e 100644 (file)
@@ -289,6 +289,7 @@ static QEMUMachine pc_i440fx_machine_v1_4 = {
     .init = pc_init_pci_1_3,
     .max_cpus = 255,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_1_3 \
@@ -307,6 +308,7 @@ static QEMUMachine pc_machine_v1_3 = {
         PC_COMPAT_1_3,
         { /* end of list */ }
     },
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_1_2 \
@@ -346,6 +348,7 @@ static QEMUMachine pc_machine_v1_2 = {
         PC_COMPAT_1_2,
         { /* end of list */ }
     },
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_1_1 \
@@ -389,6 +392,7 @@ static QEMUMachine pc_machine_v1_1 = {
         PC_COMPAT_1_1,
         { /* end of list */ }
     },
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_1_0 \
@@ -425,6 +429,7 @@ static QEMUMachine pc_machine_v1_0 = {
         { /* end of list */ }
     },
     .hw_version = "1.0",
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_0_15 \
@@ -440,6 +445,7 @@ static QEMUMachine pc_machine_v0_15 = {
         { /* end of list */ }
     },
     .hw_version = "0.15",
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_0_14 \
@@ -481,6 +487,7 @@ static QEMUMachine pc_machine_v0_14 = {
         { /* end of list */ }
     },
     .hw_version = "0.14",
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_0_13 \
@@ -518,6 +525,7 @@ static QEMUMachine pc_machine_v0_13 = {
         { /* end of list */ }
     },
     .hw_version = "0.13",
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_0_12 \
@@ -551,6 +559,7 @@ static QEMUMachine pc_machine_v0_12 = {
         { /* end of list */ }
     },
     .hw_version = "0.12",
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #define PC_COMPAT_0_11 \
@@ -584,6 +593,7 @@ static QEMUMachine pc_machine_v0_11 = {
         { /* end of list */ }
     },
     .hw_version = "0.11",
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine pc_machine_v0_10 = {
@@ -617,6 +627,7 @@ static QEMUMachine pc_machine_v0_10 = {
         { /* end of list */ }
     },
     .hw_version = "0.10",
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine isapc_machine = {
@@ -632,6 +643,7 @@ static QEMUMachine isapc_machine = {
         },
         { /* end of list */ }
     },
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 #ifdef CONFIG_XEN
@@ -641,6 +653,7 @@ static QEMUMachine xenfv_machine = {
     .init = pc_xen_hvm_init,
     .max_cpus = HVM_MAX_VCPUS,
     .default_machine_opts = "accel=xen",
+    DEFAULT_MACHINE_OPTIONS,
 };
 #endif
 
index 1cfdb2f302584873d8ee97275c450634b1bee909..9cad07476e30bbf6a7fd063a40365af215de269d 100644 (file)
@@ -173,7 +173,8 @@ static QEMUMachine petalogix_ml605_machine = {
     .name = "petalogix-ml605",
     .desc = "PetaLogix linux refdesign for xilinx ml605 little endian",
     .init = petalogix_ml605_init,
-    .is_default = 0
+    .is_default = 0,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void petalogix_ml605_machine_init(void)
index 27ecfe7752c9fdfe0c8e9b0caa4e4fffb2459334..8605fb8c003b1836273e46ce0a4c0b85082e890a 100644 (file)
@@ -115,7 +115,8 @@ static QEMUMachine petalogix_s3adsp1800_machine = {
     .name = "petalogix-s3adsp1800",
     .desc = "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800",
     .init = petalogix_s3adsp1800_init,
-    .is_default = 1
+    .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void petalogix_s3adsp1800_machine_init(void)
index 4deb02ac38fcf477463a68d93cf6c49a95b4fcd2..2dcc4a9852512a7a313d83a962a7900674812337 100644 (file)
@@ -54,6 +54,7 @@ static QEMUMachine e500plat_machine = {
     .desc = "generic paravirt e500 platform",
     .init = e500plat_init,
     .max_cpus = 15,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void e500plat_machine_init(void)
index f9ae20f5a3b070e5b964bc600d9e1ee0e1d940e2..8e05e55c87613ac5b7d10edc2256eb2d517dff74 100644 (file)
@@ -54,6 +54,7 @@ static QEMUMachine ppce500_machine = {
     .desc = "mpc8544ds",
     .init = mpc8544ds_init,
     .max_cpus = 15,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void ppce500_machine_init(void)
index 8f7f0d07d1212cf5f8a328d7fa8ce654e7f44253..45ed3769a31662a8a97553a505b7a3715d046779 100644 (file)
@@ -649,6 +649,7 @@ static QEMUMachine taihu_machine = {
     .name = "taihu",
     .desc = "taihu",
     .init = taihu_405ep_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void ppc405_machine_init(void)
index d1e4f0e811940dd8f914f4b6717fc02e06f88f17..73b5ac725c1f585ee228313e4e42bd21cdc10f89 100644 (file)
@@ -295,6 +295,7 @@ static QEMUMachine bamboo_machine = {
     .name = "bamboo",
     .desc = "bamboo",
     .init = bamboo_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void bamboo_machine_init(void)
index fabcc08b406466327c162346dda796451e88430a..7a465a7ebbdc73e668a55f0ee16e2a73a0dea885 100644 (file)
@@ -442,6 +442,7 @@ static QEMUMachine core99_machine = {
 #ifdef TARGET_PPC64
     .is_default = 1,
 #endif
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void core99_machine_init(void)
index fff5129ca9ad221f2763d628df772860dc60a540..de34e7530afe1591f8f26aeea9467d3c8fb9233d 100644 (file)
@@ -341,6 +341,7 @@ static QEMUMachine heathrow_machine = {
 #ifndef TARGET_PPC64
     .is_default = 1,
 #endif
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void heathrow_machine_init(void)
index 417583a96d3854428bb9b302d649f1177336402f..a35fbedbdce828877b7dd3ffedca51fdde672086 100644 (file)
@@ -669,6 +669,7 @@ static QEMUMachine prep_machine = {
     .desc = "PowerPC PREP platform",
     .init = ppc_prep_init,
     .max_cpus = MAX_CPUS,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void prep_machine_init(void)
index 7814bc50512eb39d0d5f22a800c4c6829935c933..c722510d7e78794ab8a37337469652b6c4c897bc 100644 (file)
--- a/hw/puv3.c
+++ b/hw/puv3.c
@@ -124,6 +124,7 @@ static QEMUMachine puv3_machine = {
     .desc = "PKUnity Version-3 based on UniCore32",
     .init = puv3_init,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void puv3_machine_init(void)
index 7cf1893d1902621b9fb728491519c838c2e9806d..72b593f59703153230d87afa3e6157bfb57eaf3a 100644 (file)
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -347,6 +347,7 @@ static QEMUMachine r2d_machine = {
     .name = "r2d",
     .desc = "r2d-plus board",
     .init = r2d_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void r2d_machine_init(void)
index 872b3b468a5c4c89aea90f3ffeaa87a3d0867b75..cecb67e4d51974361b3762dcc07b474134fd7dc6 100644 (file)
@@ -365,6 +365,7 @@ static QEMUMachine realview_eb_machine = {
     .desc = "ARM RealView Emulation Baseboard (ARM926EJ-S)",
     .init = realview_eb_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine realview_eb_mpcore_machine = {
@@ -373,12 +374,14 @@ static QEMUMachine realview_eb_mpcore_machine = {
     .init = realview_eb_mpcore_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine realview_pb_a8_machine = {
     .name = "realview-pb-a8",
     .desc = "ARM RealView Platform Baseboard for Cortex-A8",
     .init = realview_pb_a8_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine realview_pbx_a9_machine = {
@@ -387,6 +390,7 @@ static QEMUMachine realview_pbx_a9_machine = {
     .init = realview_pbx_a9_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void realview_machine_init(void)
index 20827761d09271a702fb878a9ca58a5efc8488fa..0e93cc3641a0967247e8990665ce968649460c6b 100644 (file)
@@ -330,6 +330,7 @@ static QEMUMachine s390_machine = {
     .use_virtcon = 1,
     .max_cpus = 255,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void s390_machine_init(void)
index 86d703ad7028fdc02638099d1d9709ac7e1a6e73..6f2d55a155cd90bcaa347e7f78ac549785989afa 100644 (file)
--- a/hw/shix.c
+++ b/hw/shix.c
@@ -92,6 +92,7 @@ static QEMUMachine shix_machine = {
     .desc = "shix card",
     .init = shix_init,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void shix_machine_init(void)
index 76aa09ba81f4f925e9c577fcc86ac4981e97bb29..64765988787a50a7cfba379823d19e30af31e0e5 100644 (file)
@@ -964,6 +964,7 @@ static QEMUMachine spapr_machine = {
     .block_default_type = IF_SCSI,
     .max_cpus = MAX_CPUS,
     .no_parallel = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void spapr_machine_init(void)
index f1659c45029b3e225f5daf40f70097c9d2f8fdec..ab7ca80f6c5bf50833beff7396045d4d0db5dc20 100644 (file)
@@ -959,24 +959,28 @@ static QEMUMachine akitapda_machine = {
     .name = "akita",
     .desc = "Akita PDA (PXA270)",
     .init = akita_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine spitzpda_machine = {
     .name = "spitz",
     .desc = "Spitz PDA (PXA270)",
     .init = spitz_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine borzoipda_machine = {
     .name = "borzoi",
     .desc = "Borzoi PDA (PXA270)",
     .init = borzoi_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine terrierpda_machine = {
     .name = "terrier",
     .desc = "Terrier PDA (PXA270)",
     .init = terrier_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void spitz_machine_init(void)
index 12e45685346c610f00a3ae6cc4375123ef4414e1..b5e78ffb682c97cf1871e7ea736b2603f09ad9ea 100644 (file)
@@ -1331,12 +1331,14 @@ static QEMUMachine lm3s811evb_machine = {
     .name = "lm3s811evb",
     .desc = "Stellaris LM3S811EVB",
     .init = lm3s811evb_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine lm3s6965evb_machine = {
     .name = "lm3s6965evb",
     .desc = "Stellaris LM3S6965EVB",
     .init = lm3s6965evb_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void stellaris_machine_init(void)
index 5925d292c3173e059d12c6887b448b091b98ac97..6f5de44a89e5630c0175d86017bac5280b35dd8c 100644 (file)
@@ -1428,6 +1428,7 @@ static QEMUMachine ss5_machine = {
     .init = ss5_init,
     .block_default_type = IF_SCSI,
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine ss10_machine = {
@@ -1436,6 +1437,7 @@ static QEMUMachine ss10_machine = {
     .init = ss10_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine ss600mp_machine = {
@@ -1444,6 +1446,7 @@ static QEMUMachine ss600mp_machine = {
     .init = ss600mp_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine ss20_machine = {
@@ -1452,6 +1455,7 @@ static QEMUMachine ss20_machine = {
     .init = ss20_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine voyager_machine = {
@@ -1459,6 +1463,7 @@ static QEMUMachine voyager_machine = {
     .desc = "Sun4m platform, SPARCstation Voyager",
     .init = vger_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine ss_lx_machine = {
@@ -1466,6 +1471,7 @@ static QEMUMachine ss_lx_machine = {
     .desc = "Sun4m platform, SPARCstation LX",
     .init = ss_lx_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine ss4_machine = {
@@ -1473,6 +1479,7 @@ static QEMUMachine ss4_machine = {
     .desc = "Sun4m platform, SPARCstation 4",
     .init = ss4_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine scls_machine = {
@@ -1480,6 +1487,7 @@ static QEMUMachine scls_machine = {
     .desc = "Sun4m platform, SPARCClassic",
     .init = scls_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine sbook_machine = {
@@ -1487,6 +1495,7 @@ static QEMUMachine sbook_machine = {
     .desc = "Sun4m platform, SPARCbook",
     .init = sbook_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static const struct sun4d_hwdef sun4d_hwdefs[] = {
@@ -1711,6 +1720,7 @@ static QEMUMachine ss1000_machine = {
     .init = ss1000_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 8,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine ss2000_machine = {
@@ -1719,6 +1729,7 @@ static QEMUMachine ss2000_machine = {
     .init = ss2000_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 20,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static const struct sun4c_hwdef sun4c_hwdefs[] = {
@@ -1897,6 +1908,7 @@ static QEMUMachine ss2_machine = {
     .desc = "Sun4c platform, SPARCstation 2",
     .init = ss2_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void sun4m_register_types(void)
index 3a06d70795ab82806669ca61820c1a2f2bc0e762..cb75d03278622c5d7dd15df3e684ef77a2ccf307 100644 (file)
@@ -978,6 +978,7 @@ static QEMUMachine sun4u_machine = {
     .init = sun4u_init,
     .max_cpus = 1, // XXX for now
     .is_default = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine sun4v_machine = {
@@ -985,6 +986,7 @@ static QEMUMachine sun4v_machine = {
     .desc = "Sun4v platform",
     .init = sun4v_init,
     .max_cpus = 1, // XXX for now
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine niagara_machine = {
@@ -992,6 +994,7 @@ static QEMUMachine niagara_machine = {
     .desc = "Sun4v platform, Niagara",
     .init = niagara_init,
     .max_cpus = 1, // XXX for now
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void sun4u_register_types(void)
index 7048b797d38dfac85207db3950ebbdb5fbfc19de..efea109795d2994954c331e7ffad36bdd907e949 100644 (file)
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -251,6 +251,7 @@ static QEMUMachine tosapda_machine = {
     .name = "tosa",
     .desc = "Tosa PDA (PXA255)",
     .init = tosa_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void tosapda_machine_init(void)
index bf72ebb3051a4606beaad1b83e6e6a074fc4f387..7a1b20b36c3b664aac9288faeeab354a59342eaa 100644 (file)
@@ -359,6 +359,7 @@ static QEMUMachine versatilepb_machine = {
     .desc = "ARM Versatile/PB (ARM926EJ-S)",
     .init = vpb_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine versatileab_machine = {
@@ -366,6 +367,7 @@ static QEMUMachine versatileab_machine = {
     .desc = "ARM Versatile/AB (ARM926EJ-S)",
     .init = vab_init,
     .block_default_type = IF_SCSI,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void versatile_machine_init(void)
index 93c3176667661cb5df579d293ccc2b64b5796957..6bbe8c38f9b02f68f3e6828713df15730108ec02 100644 (file)
@@ -479,6 +479,7 @@ static QEMUMachine vexpress_a9_machine = {
     .init = vexpress_a9_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine vexpress_a15_machine = {
@@ -487,6 +488,7 @@ static QEMUMachine vexpress_a15_machine = {
     .init = vexpress_a15_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void vexpress_machine_init(void)
index 78450d7c40b6e6234b6df3208396fcd61ba7c2b3..8c4e8e4313bead0bfdf36f3139832ebca0dcb10d 100644 (file)
@@ -263,6 +263,7 @@ static QEMUMachine virtex_machine = {
     .name = "virtex-ml507",
     .desc = "Xilinx Virtex ML507 reference design",
     .init = virtex_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void virtex_machine_init(void)
index 9feecd5a2797a3b65147f7e0d79ee084bce841a5..66e898123ea496fd64e686a462fb29a6152a18bb 100644 (file)
@@ -115,6 +115,7 @@ static QEMUMachine xenpv_machine = {
     .init = xen_init_pv,
     .max_cpus = 1,
     .default_machine_opts = "accel=xen",
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void xenpv_machine_init(void)
index da0a7d0aa173538b8cccb5d5c5f41a634647a998..8dede9fe89a1414f1bf106dbe1f2013d7c79a47a 100644 (file)
@@ -203,7 +203,8 @@ static QEMUMachine zynq_machine = {
     .init = zynq_init,
     .block_default_type = IF_SCSI,
     .max_cpus = 1,
-    .no_sdcard = 1
+    .no_sdcard = 1,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void zynq_machine_init(void)
index 0b9a52851a86b5d5c3e01e70ff04f36f3f698292..a85fe9b73804b28d6e17b708d29b4e31779fb51f 100644 (file)
@@ -295,6 +295,7 @@ static QEMUMachine xtensa_lx60_machine = {
     .desc = "lx60 EVB (" XTENSA_DEFAULT_CPU_MODEL ")",
     .init = xtensa_lx60_init,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static QEMUMachine xtensa_lx200_machine = {
@@ -302,6 +303,7 @@ static QEMUMachine xtensa_lx200_machine = {
     .desc = "lx200 EVB (" XTENSA_DEFAULT_CPU_MODEL ")",
     .init = xtensa_lx200_init,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void xtensa_lx_machines_init(void)
index 14fe85b2fc276b1df24ded15de4b8e26ac1af067..864e57c52caab1fdd7a7f9c04df843d813600b27 100644 (file)
@@ -106,6 +106,7 @@ static QEMUMachine xtensa_sim_machine = {
     .is_default = true,
     .init = xtensa_sim_init,
     .max_cpus = 4,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void xtensa_sim_machine_init(void)
diff --git a/hw/z2.c b/hw/z2.c
index 496e47df6c3852c07848a1793ed0dc6df7f8d186..731550f2d8652c15d9cb5bd04fc5c7c9c96d64cb 100644 (file)
--- a/hw/z2.c
+++ b/hw/z2.c
@@ -373,6 +373,7 @@ static QEMUMachine z2_machine = {
     .name = "z2",
     .desc = "Zipit Z2 (PXA27x)",
     .init = z2_init,
+    DEFAULT_MACHINE_OPTIONS,
 };
 
 static void z2_machine_init(void)
diff --git a/vl.c b/vl.c
index 59ce0636015b4a1b1d0cde26ab72164fba352058..15e0280daad0de15c602acbec2a159429b7b20a2 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2712,7 +2712,7 @@ int main(int argc, char **argv, char **envp)
     const char *icount_option = NULL;
     const char *initrd_filename;
     const char *kernel_filename, *kernel_cmdline;
-    char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
+    char boot_devices[33] = "";
     DisplayState *ds;
     int cyls, heads, secs, translation;
     QemuOpts *hda_opts = NULL, *opts, *machine_opts;
@@ -4084,7 +4084,9 @@ int main(int argc, char **argv, char **envp)
     qdev_machine_init();
 
     QEMUMachineInitArgs args = { .ram_size = ram_size,
-                                 .boot_device = boot_devices,
+                                 .boot_device = (boot_devices[0] == '\0') ?
+                                                machine->boot_order :
+                                                boot_devices,
                                  .kernel_filename = kernel_filename,
                                  .kernel_cmdline = kernel_cmdline,
                                  .initrd_filename = initrd_filename,