diff mbox

[v3,7/7] hw: Make QEMUMachine structure definitions const

Message ID 1301407704-24541-8-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell March 29, 2011, 2:08 p.m. UTC
Now that qemu_register_machine() accepts a const QEMUMachine *, we can
mark all the static QEMUMachine structure definitions for boards as
being const.

This patch was mostly automatically generated via:
sed -i -e 's/^static QEMUMachine /static const QEMUMachine /' hw/*.c
and then checked for completeness with a grep for QEMUMachine, which
showed up the mips_fulong2e and leon3 machines which were missing a
'static' (which has been added here).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/an5206.c                   |    2 +-
 hw/axis_dev88.c               |    2 +-
 hw/dummy_m68k.c               |    2 +-
 hw/etraxfs.c                  |    2 +-
 hw/gumstix.c                  |    4 ++--
 hw/integratorcp.c             |    2 +-
 hw/leon3.c                    |    2 +-
 hw/lm32_boards.c              |    4 ++--
 hw/mainstone.c                |    2 +-
 hw/mcf5208.c                  |    2 +-
 hw/mips_fulong2e.c            |    2 +-
 hw/mips_jazz.c                |    4 ++--
 hw/mips_malta.c               |    2 +-
 hw/mips_mipssim.c             |    2 +-
 hw/mips_r4k.c                 |    2 +-
 hw/musicpal.c                 |    2 +-
 hw/nseries.c                  |    4 ++--
 hw/omap_sx1.c                 |    4 ++--
 hw/palm.c                     |    2 +-
 hw/pc_piix.c                  |   12 ++++++------
 hw/petalogix_ml605_mmu.c      |    2 +-
 hw/petalogix_s3adsp1800_mmu.c |    2 +-
 hw/ppc405_boards.c            |    4 ++--
 hw/ppc440_bamboo.c            |    4 ++--
 hw/ppc_newworld.c             |    2 +-
 hw/ppc_oldworld.c             |    2 +-
 hw/ppc_prep.c                 |    2 +-
 hw/ppce500_mpc8544ds.c        |    2 +-
 hw/r2d.c                      |    2 +-
 hw/realview.c                 |    8 ++++----
 hw/s390-virtio.c              |    2 +-
 hw/shix.c                     |    2 +-
 hw/spitz.c                    |    8 ++++----
 hw/stellaris.c                |    4 ++--
 hw/sun4u.c                    |    6 +++---
 hw/syborg.c                   |    2 +-
 hw/tosa.c                     |    2 +-
 hw/versatilepb.c              |    4 ++--
 hw/virtex_ml507.c             |    2 +-
 hw/xen_machine_pv.c           |    2 +-
 40 files changed, 62 insertions(+), 62 deletions(-)
diff mbox

Patch

diff --git a/hw/an5206.c b/hw/an5206.c
index b9f19a9..8bd70fe 100644
--- a/hw/an5206.c
+++ b/hw/an5206.c
@@ -87,7 +87,7 @@  static void an5206_init(ram_addr_t ram_size,
     env->pc = entry;
 }
 
-static QEMUMachine an5206_machine = {
+static const QEMUMachine an5206_machine = {
     .name = "an5206",
     .desc = "Arnewsh 5206",
     .init = an5206_init,
diff --git a/hw/axis_dev88.c b/hw/axis_dev88.c
index 57b5e2f..0aef171 100644
--- a/hw/axis_dev88.c
+++ b/hw/axis_dev88.c
@@ -343,7 +343,7 @@  void axisdev88_init (ram_addr_t ram_size,
     cris_load_image(env, &li);
 }
 
-static QEMUMachine axisdev88_machine = {
+static const QEMUMachine axisdev88_machine = {
     .name = "axis-dev88",
     .desc = "AXIS devboard 88",
     .init = axisdev88_init,
diff --git a/hw/dummy_m68k.c b/hw/dummy_m68k.c
index 61efb39..1954282 100644
--- a/hw/dummy_m68k.c
+++ b/hw/dummy_m68k.c
@@ -66,7 +66,7 @@  static void dummy_m68k_init(ram_addr_t ram_size,
     env->pc = entry;
 }
 
-static QEMUMachine dummy_m68k_machine = {
+static const QEMUMachine dummy_m68k_machine = {
     .name = "dummy",
     .desc = "Dummy board",
     .init = dummy_m68k_init,
diff --git a/hw/etraxfs.c b/hw/etraxfs.c
index 5ee5f97..7a92b7a 100644
--- a/hw/etraxfs.c
+++ b/hw/etraxfs.c
@@ -145,7 +145,7 @@  void bareetraxfs_init (ram_addr_t ram_size,
     }
 }
 
-static QEMUMachine bareetraxfs_machine = {
+static const QEMUMachine bareetraxfs_machine = {
     .name = "bareetraxfs",
     .desc = "Bare ETRAX FS board",
     .init = bareetraxfs_init,
diff --git a/hw/gumstix.c b/hw/gumstix.c
index ee63f63..8eca2ba 100644
--- a/hw/gumstix.c
+++ b/hw/gumstix.c
@@ -120,13 +120,13 @@  static void verdex_init(ram_addr_t ram_size,
                     qdev_get_gpio_in(cpu->gpio, 99));
 }
 
-static QEMUMachine connex_machine = {
+static const QEMUMachine connex_machine = {
     .name = "connex",
     .desc = "Gumstix Connex (PXA255)",
     .init = connex_init,
 };
 
-static QEMUMachine verdex_machine = {
+static const QEMUMachine verdex_machine = {
     .name = "verdex",
     .desc = "Gumstix Verdex (PXA270)",
     .init = verdex_init,
diff --git a/hw/integratorcp.c b/hw/integratorcp.c
index ccc44db..a7d02ba 100644
--- a/hw/integratorcp.c
+++ b/hw/integratorcp.c
@@ -512,7 +512,7 @@  static void integratorcp_init(ram_addr_t ram_size,
     arm_load_kernel(env, &integrator_binfo);
 }
 
-static QEMUMachine integratorcp_machine = {
+static const QEMUMachine integratorcp_machine = {
     .name = "integratorcp",
     .desc = "ARM Integrator/CP (ARM926EJ-S)",
     .init = integratorcp_init,
diff --git a/hw/leon3.c b/hw/leon3.c
index 919f49f..b6ebf52 100644
--- a/hw/leon3.c
+++ b/hw/leon3.c
@@ -202,7 +202,7 @@  static void leon3_generic_hw_init(ram_addr_t  ram_size,
     }
 }
 
-QEMUMachine leon3_generic_machine = {
+static const QEMUMachine leon3_generic_machine = {
     .name     = "leon3_generic",
     .desc     = "Leon-3 generic",
     .init     = leon3_generic_hw_init,
diff --git a/hw/lm32_boards.c b/hw/lm32_boards.c
index 85190f0..e2b0081 100644
--- a/hw/lm32_boards.c
+++ b/hw/lm32_boards.c
@@ -282,14 +282,14 @@  static void lm32_uclinux_init(ram_addr_t ram_size_not_used,
     qemu_register_reset(main_cpu_reset, reset_info);
 }
 
-static QEMUMachine lm32_evr_machine = {
+static const QEMUMachine lm32_evr_machine = {
     .name = "lm32-evr",
     .desc = "LatticeMico32 EVR32 eval system",
     .init = lm32_evr_init,
     .is_default = 1
 };
 
-static QEMUMachine lm32_uclinux_machine = {
+static const QEMUMachine lm32_uclinux_machine = {
     .name = "lm32-uclinux",
     .desc = "lm32 platform for uClinux and u-boot by Theobroma Systems",
     .init = lm32_uclinux_init,
diff --git a/hw/mainstone.c b/hw/mainstone.c
index 50691ca..6605d21 100644
--- a/hw/mainstone.c
+++ b/hw/mainstone.c
@@ -175,7 +175,7 @@  static void mainstone_init(ram_addr_t ram_size,
                 kernel_cmdline, initrd_filename, cpu_model, mainstone, 0x196);
 }
 
-static QEMUMachine mainstone2_machine = {
+static const QEMUMachine mainstone2_machine = {
     .name = "mainstone",
     .desc = "Mainstone II (PXA27x)",
     .init = mainstone_init,
diff --git a/hw/mcf5208.c b/hw/mcf5208.c
index 17a692d..75216a1 100644
--- a/hw/mcf5208.c
+++ b/hw/mcf5208.c
@@ -291,7 +291,7 @@  static void mcf5208evb_init(ram_addr_t ram_size,
     env->pc = entry;
 }
 
-static QEMUMachine mcf5208evb_machine = {
+static const QEMUMachine mcf5208evb_machine = {
     .name = "mcf5208evb",
     .desc = "MCF5206EVB",
     .init = mcf5208evb_init,
diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c
index f5ae639..90d16ee 100644
--- a/hw/mips_fulong2e.c
+++ b/hw/mips_fulong2e.c
@@ -394,7 +394,7 @@  static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
     network_init();
 }
 
-QEMUMachine mips_fulong2e_machine = {
+static const QEMUMachine mips_fulong2e_machine = {
     .name = "fulong2e",
     .desc = "Fulong 2e mini pc",
     .init = mips_fulong2e_init,
diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
index a100394..7aae4dc 100644
--- a/hw/mips_jazz.c
+++ b/hw/mips_jazz.c
@@ -291,14 +291,14 @@  void mips_pica61_init (ram_addr_t ram_size,
     mips_jazz_init(ram_size, cpu_model, JAZZ_PICA61);
 }
 
-static QEMUMachine mips_magnum_machine = {
+static const QEMUMachine mips_magnum_machine = {
     .name = "magnum",
     .desc = "MIPS Magnum",
     .init = mips_magnum_init,
     .use_scsi = 1,
 };
 
-static QEMUMachine mips_pica61_machine = {
+static const QEMUMachine mips_pica61_machine = {
     .name = "pica61",
     .desc = "Acer Pica 61",
     .init = mips_pica61_init,
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index d8baa6d..b540f06 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -967,7 +967,7 @@  void mips_malta_init (ram_addr_t ram_size,
     }
 }
 
-static QEMUMachine mips_malta_machine = {
+static const QEMUMachine mips_malta_machine = {
     .name = "malta",
     .desc = "MIPS Malta Core LV",
     .init = mips_malta_init,
diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c
index 380a7eb..943eb9e 100644
--- a/hw/mips_mipssim.c
+++ b/hw/mips_mipssim.c
@@ -198,7 +198,7 @@  mips_mipssim_init (ram_addr_t ram_size,
         mipsnet_init(0x4200, env->irq[2], &nd_table[0]);
 }
 
-static QEMUMachine mips_mipssim_machine = {
+static const QEMUMachine mips_mipssim_machine = {
     .name = "mipssim",
     .desc = "MIPS MIPSsim platform",
     .init = mips_mipssim_init,
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c
index 8feb461..c224f83 100644
--- a/hw/mips_r4k.c
+++ b/hw/mips_r4k.c
@@ -304,7 +304,7 @@  void mips_r4k_init (ram_addr_t ram_size,
     isa_create_simple("i8042");
 }
 
-static QEMUMachine mips_machine = {
+static const QEMUMachine mips_machine = {
     .name = "mips",
     .desc = "mips r4k platform",
     .init = mips_r4k_init,
diff --git a/hw/musicpal.c b/hw/musicpal.c
index d98aa8d..7242c6f 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -1636,7 +1636,7 @@  static void musicpal_init(ram_addr_t ram_size,
     arm_load_kernel(env, &musicpal_binfo);
 }
 
-static QEMUMachine musicpal_machine = {
+static const QEMUMachine musicpal_machine = {
     .name = "musicpal",
     .desc = "Marvell 88w8618 / MusicPal (ARM926EJ-S)",
     .init = musicpal_init,
diff --git a/hw/nseries.c b/hw/nseries.c
index 2f6f473..77258cc 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -1396,13 +1396,13 @@  static void n810_init(ram_addr_t ram_size,
                     cpu_model, &n810_binfo, 810);
 }
 
-static QEMUMachine n800_machine = {
+static const QEMUMachine n800_machine = {
     .name = "n800",
     .desc = "Nokia N800 tablet aka. RX-34 (OMAP2420)",
     .init = n800_init,
 };
 
-static QEMUMachine n810_machine = {
+static const QEMUMachine n810_machine = {
     .name = "n810",
     .desc = "Nokia N810 tablet aka. RX-44 (OMAP2420)",
     .init = n810_init,
diff --git a/hw/omap_sx1.c b/hw/omap_sx1.c
index 06bccbd..1dfbd28 100644
--- a/hw/omap_sx1.c
+++ b/hw/omap_sx1.c
@@ -233,13 +233,13 @@  static void sx1_init_v2(ram_addr_t ram_size,
                 kernel_cmdline, initrd_filename, cpu_model, 2);
 }
 
-static QEMUMachine sx1_machine_v2 = {
+static const QEMUMachine sx1_machine_v2 = {
     .name = "sx1",
     .desc = "Siemens SX1 (OMAP310) V2",
     .init = sx1_init_v2,
 };
 
-static QEMUMachine sx1_machine_v1 = {
+static const QEMUMachine sx1_machine_v1 = {
     .name = "sx1-v1",
     .desc = "Siemens SX1 (OMAP310) V1",
     .init = sx1_init_v1,
diff --git a/hw/palm.c b/hw/palm.c
index f22d777..3411222 100644
--- a/hw/palm.c
+++ b/hw/palm.c
@@ -275,7 +275,7 @@  static void palmte_init(ram_addr_t ram_size,
     dpy_resize(ds);
 }
 
-static QEMUMachine palmte_machine = {
+static const QEMUMachine palmte_machine = {
     .name = "cheetah",
     .desc = "Palm Tungsten|E aka. Cheetah PDA (OMAP310)",
     .init = palmte_init,
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index b3ede89..1474969 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -227,7 +227,7 @@  static void pc_init_isa(ram_addr_t ram_size,
              initrd_filename, cpu_model, 0, 1);
 }
 
-static QEMUMachine pc_machine = {
+static const QEMUMachine pc_machine = {
     .name = "pc-0.14",
     .alias = "pc",
     .desc = "Standard PC",
@@ -236,7 +236,7 @@  static QEMUMachine pc_machine = {
     .is_default = 1,
 };
 
-static QEMUMachine pc_machine_v0_13 = {
+static const QEMUMachine pc_machine_v0_13 = {
     .name = "pc-0.13",
     .desc = "Standard PC",
     .init = pc_init_pci_no_kvmclock,
@@ -263,7 +263,7 @@  static QEMUMachine pc_machine_v0_13 = {
     },
 };
 
-static QEMUMachine pc_machine_v0_12 = {
+static const QEMUMachine pc_machine_v0_12 = {
     .name = "pc-0.12",
     .desc = "Standard PC",
     .init = pc_init_pci_no_kvmclock,
@@ -294,7 +294,7 @@  static QEMUMachine pc_machine_v0_12 = {
     }
 };
 
-static QEMUMachine pc_machine_v0_11 = {
+static const QEMUMachine pc_machine_v0_11 = {
     .name = "pc-0.11",
     .desc = "Standard PC, qemu 0.11",
     .init = pc_init_pci_no_kvmclock,
@@ -333,7 +333,7 @@  static QEMUMachine pc_machine_v0_11 = {
     }
 };
 
-static QEMUMachine pc_machine_v0_10 = {
+static const QEMUMachine pc_machine_v0_10 = {
     .name = "pc-0.10",
     .desc = "Standard PC, qemu 0.10",
     .init = pc_init_pci_no_kvmclock,
@@ -384,7 +384,7 @@  static QEMUMachine pc_machine_v0_10 = {
     },
 };
 
-static QEMUMachine isapc_machine = {
+static const QEMUMachine isapc_machine = {
     .name = "isapc",
     .desc = "ISA-only PC",
     .init = pc_init_isa,
diff --git a/hw/petalogix_ml605_mmu.c b/hw/petalogix_ml605_mmu.c
index 8213902..1ce6585 100644
--- a/hw/petalogix_ml605_mmu.c
+++ b/hw/petalogix_ml605_mmu.c
@@ -251,7 +251,7 @@  petalogix_ml605_init(ram_addr_t ram_size,
     }
 }
 
-static QEMUMachine petalogix_ml605_machine = {
+static const QEMUMachine petalogix_ml605_machine = {
     .name = "petalogix-ml605",
     .desc = "PetaLogix linux refdesign for xilinx ml605 little endian",
     .init = petalogix_ml605_init,
diff --git a/hw/petalogix_s3adsp1800_mmu.c b/hw/petalogix_s3adsp1800_mmu.c
index 4dcdfbd..92c1a4a 100644
--- a/hw/petalogix_s3adsp1800_mmu.c
+++ b/hw/petalogix_s3adsp1800_mmu.c
@@ -215,7 +215,7 @@  petalogix_s3adsp1800_init(ram_addr_t ram_size,
     }
 }
 
-static QEMUMachine petalogix_s3adsp1800_machine = {
+static const QEMUMachine petalogix_s3adsp1800_machine = {
     .name = "petalogix-s3adsp1800",
     .desc = "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800",
     .init = petalogix_s3adsp1800_init,
diff --git a/hw/ppc405_boards.c b/hw/ppc405_boards.c
index ad27181..3b3dd57 100644
--- a/hw/ppc405_boards.c
+++ b/hw/ppc405_boards.c
@@ -353,7 +353,7 @@  static void ref405ep_init (ram_addr_t ram_size,
     printf("bdloc %016lx\n", (unsigned long)bdloc);
 }
 
-static QEMUMachine ref405ep_machine = {
+static const QEMUMachine ref405ep_machine = {
     .name = "ref405ep",
     .desc = "ref405ep",
     .init = ref405ep_init,
@@ -639,7 +639,7 @@  static void taihu_405ep_init(ram_addr_t ram_size,
 #endif
 }
 
-static QEMUMachine taihu_machine = {
+static const QEMUMachine taihu_machine = {
     .name = "taihu",
     .desc = "taihu",
     .init = taihu_405ep_init,
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
index 34ddf45..6aef3aa 100644
--- a/hw/ppc440_bamboo.c
+++ b/hw/ppc440_bamboo.c
@@ -169,14 +169,14 @@  static void bamboo_init(ram_addr_t ram_size,
         kvmppc_init();
 }
 
-static QEMUMachine bamboo_machine = {
+static const QEMUMachine bamboo_machine = {
     .name = "bamboo-0.13",
     .alias = "bamboo",
     .desc = "bamboo",
     .init = bamboo_init,
 };
 
-static QEMUMachine bamboo_machine_v0_12 = {
+static const QEMUMachine bamboo_machine_v0_12 = {
     .name = "bamboo-0.12",
     .desc = "bamboo",
     .init = bamboo_init,
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index b9245f0..0b64a4b 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -411,7 +411,7 @@  static void ppc_core99_init (ram_addr_t ram_size,
     qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
 }
 
-static QEMUMachine core99_machine = {
+static const QEMUMachine core99_machine = {
     .name = "mac99",
     .desc = "Mac99 based PowerMAC",
     .init = ppc_core99_init,
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index 8a4e088..f9d82dd 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -314,7 +314,7 @@  static void ppc_heathrow_init (ram_addr_t ram_size,
     qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
 }
 
-static QEMUMachine heathrow_machine = {
+static const QEMUMachine heathrow_machine = {
     .name = "g3beige",
     .desc = "Heathrow based PowerMAC",
     .init = ppc_heathrow_init,
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 5615ef9..8568ecd 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -756,7 +756,7 @@  static void ppc_prep_init (ram_addr_t ram_size,
     register_ioport_write(0x0F00, 4, 1, &PPC_debug_write, NULL);
 }
 
-static QEMUMachine prep_machine = {
+static const QEMUMachine prep_machine = {
     .name = "prep",
     .desc = "PowerPC PREP platform",
     .init = ppc_prep_init,
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
index b7670ae..7a971b1 100644
--- a/hw/ppce500_mpc8544ds.c
+++ b/hw/ppce500_mpc8544ds.c
@@ -283,7 +283,7 @@  static void mpc8544ds_init(ram_addr_t ram_size,
     return;
 }
 
-static QEMUMachine mpc8544ds_machine = {
+static const QEMUMachine mpc8544ds_machine = {
     .name = "mpc8544ds",
     .desc = "mpc8544ds",
     .init = mpc8544ds_init,
diff --git a/hw/r2d.c b/hw/r2d.c
index a0f8c1f..6f948ce 100644
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -327,7 +327,7 @@  static void r2d_init(ram_addr_t ram_size,
                        SDRAM_BASE + BOOT_PARAMS_OFFSET);
 }
 
-static QEMUMachine r2d_machine = {
+static const QEMUMachine r2d_machine = {
     .name = "r2d",
     .desc = "r2d-plus board",
     .init = r2d_init,
diff --git a/hw/realview.c b/hw/realview.c
index a158ade..402e85b 100644
--- a/hw/realview.c
+++ b/hw/realview.c
@@ -427,7 +427,7 @@  static void realview_pbx_a9_init(ram_addr_t ram_size,
                   initrd_filename, cpu_model, BOARD_PBX_A9);
 }
 
-static QEMUMachine realview_eb_machine = {
+static const QEMUMachine realview_eb_machine = {
     .name = "realview-eb",
     .desc = "ARM RealView Emulation Baseboard (ARM926EJ-S)",
     .init = realview_eb_init,
@@ -435,7 +435,7 @@  static QEMUMachine realview_eb_machine = {
     .max_ram = 256 * 1024 * 1024,
 };
 
-static QEMUMachine realview_eb_mpcore_machine = {
+static const QEMUMachine realview_eb_mpcore_machine = {
     .name = "realview-eb-mpcore",
     .desc = "ARM RealView Emulation Baseboard (ARM11MPCore)",
     .init = realview_eb_mpcore_init,
@@ -444,7 +444,7 @@  static QEMUMachine realview_eb_mpcore_machine = {
     .max_ram = 256 * 1024 * 1024,
 };
 
-static QEMUMachine realview_pb_a8_machine = {
+static const QEMUMachine realview_pb_a8_machine = {
     .name = "realview-pb-a8",
     .desc = "ARM RealView Platform Baseboard for Cortex-A8",
     .init = realview_pb_a8_init,
@@ -455,7 +455,7 @@  static QEMUMachine realview_pb_a8_machine = {
     .max_ram = 1024 * 1024 * 1024,
 };
 
-static QEMUMachine realview_pbx_a9_machine = {
+static const QEMUMachine realview_pbx_a9_machine = {
     .name = "realview-pbx-a9",
     .desc = "ARM RealView Platform Baseboard Explore for Cortex-A9",
     .init = realview_pbx_a9_init,
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 850422f..d8d7bd6 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -269,7 +269,7 @@  static void s390_init(ram_addr_t ram_size,
     }
 }
 
-static QEMUMachine s390_machine = {
+static const QEMUMachine s390_machine = {
     .name = "s390-virtio",
     .alias = "s390",
     .desc = "VirtIO based S390 machine",
diff --git a/hw/shix.c b/hw/shix.c
index 638bf16..4355070 100644
--- a/hw/shix.c
+++ b/hw/shix.c
@@ -89,7 +89,7 @@  static void shix_init(ram_addr_t ram_size,
     fprintf(stderr, "initialization terminated\n");
 }
 
-static QEMUMachine shix_machine = {
+static const QEMUMachine shix_machine = {
     .name = "shix",
     .desc = "shix card",
     .init = shix_init,
diff --git a/hw/spitz.c b/hw/spitz.c
index 006f7a9..d543a90 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -980,25 +980,25 @@  static void terrier_init(ram_addr_t ram_size,
                 kernel_cmdline, initrd_filename, cpu_model, terrier, 0x33f);
 }
 
-static QEMUMachine akitapda_machine = {
+static const QEMUMachine akitapda_machine = {
     .name = "akita",
     .desc = "Akita PDA (PXA270)",
     .init = akita_init,
 };
 
-static QEMUMachine spitzpda_machine = {
+static const QEMUMachine spitzpda_machine = {
     .name = "spitz",
     .desc = "Spitz PDA (PXA270)",
     .init = spitz_init,
 };
 
-static QEMUMachine borzoipda_machine = {
+static const QEMUMachine borzoipda_machine = {
     .name = "borzoi",
     .desc = "Borzoi PDA (PXA270)",
     .init = borzoi_init,
 };
 
-static QEMUMachine terrierpda_machine = {
+static const QEMUMachine terrierpda_machine = {
     .name = "terrier",
     .desc = "Terrier PDA (PXA270)",
     .init = terrier_init,
diff --git a/hw/stellaris.c b/hw/stellaris.c
index 0d52926..4c5239e 100644
--- a/hw/stellaris.c
+++ b/hw/stellaris.c
@@ -1433,13 +1433,13 @@  static void lm3s6965evb_init(ram_addr_t ram_size,
     stellaris_init(kernel_filename, cpu_model, &stellaris_boards[1]);
 }
 
-static QEMUMachine lm3s811evb_machine = {
+static const QEMUMachine lm3s811evb_machine = {
     .name = "lm3s811evb",
     .desc = "Stellaris LM3S811EVB",
     .init = lm3s811evb_init,
 };
 
-static QEMUMachine lm3s6965evb_machine = {
+static const QEMUMachine lm3s6965evb_machine = {
     .name = "lm3s6965evb",
     .desc = "Stellaris LM3S6965EVB",
     .init = lm3s6965evb_init,
diff --git a/hw/sun4u.c b/hw/sun4u.c
index dbb5a15..cb41c9f 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -910,7 +910,7 @@  static void niagara_init(ram_addr_t RAM_size,
                 kernel_cmdline, initrd_filename, cpu_model, &hwdefs[2]);
 }
 
-static QEMUMachine sun4u_machine = {
+static const QEMUMachine sun4u_machine = {
     .name = "sun4u",
     .desc = "Sun4u platform",
     .init = sun4u_init,
@@ -918,14 +918,14 @@  static QEMUMachine sun4u_machine = {
     .is_default = 1,
 };
 
-static QEMUMachine sun4v_machine = {
+static const QEMUMachine sun4v_machine = {
     .name = "sun4v",
     .desc = "Sun4v platform",
     .init = sun4v_init,
     .max_cpus = 1, // XXX for now
 };
 
-static QEMUMachine niagara_machine = {
+static const QEMUMachine niagara_machine = {
     .name = "Niagara",
     .desc = "Sun4v platform, Niagara",
     .init = niagara_init,
diff --git a/hw/syborg.c b/hw/syborg.c
index 758c69a..468049b 100644
--- a/hw/syborg.c
+++ b/hw/syborg.c
@@ -98,7 +98,7 @@  static void syborg_init(ram_addr_t ram_size,
     arm_load_kernel(env, &syborg_binfo);
 }
 
-static QEMUMachine syborg_machine = {
+static const QEMUMachine syborg_machine = {
     .name = "syborg",
     .desc = "Syborg (Symbian Virtual Platform)",
     .init = syborg_init,
diff --git a/hw/tosa.c b/hw/tosa.c
index b8b6c4f..cddf2cd 100644
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -243,7 +243,7 @@  static void tosa_init(ram_addr_t ram_size,
     sl_bootparam_write(SL_PXA_PARAM_BASE);
 }
 
-static QEMUMachine tosapda_machine = {
+static const QEMUMachine tosapda_machine = {
     .name = "tosa",
     .desc = "Tosa PDA (PXA255)",
     .init = tosa_init,
diff --git a/hw/versatilepb.c b/hw/versatilepb.c
index aeddd28..3f22124 100644
--- a/hw/versatilepb.c
+++ b/hw/versatilepb.c
@@ -324,7 +324,7 @@  static void vab_init(ram_addr_t ram_size,
                    initrd_filename, cpu_model, 0x25e);
 }
 
-static QEMUMachine versatilepb_machine = {
+static const QEMUMachine versatilepb_machine = {
     .name = "versatilepb",
     .desc = "ARM Versatile/PB (ARM926EJ-S)",
     .init = vpb_init,
@@ -335,7 +335,7 @@  static QEMUMachine versatilepb_machine = {
     .max_ram = 256 * 1024 * 1024,
 };
 
-static QEMUMachine versatileab_machine = {
+static const QEMUMachine versatileab_machine = {
     .name = "versatileab",
     .desc = "ARM Versatile/AB (ARM926EJ-S)",
     .init = vab_init,
diff --git a/hw/virtex_ml507.c b/hw/virtex_ml507.c
index fa60515..e236e0e 100644
--- a/hw/virtex_ml507.c
+++ b/hw/virtex_ml507.c
@@ -262,7 +262,7 @@  static void virtex_init(ram_addr_t ram_size,
     env->load_info = &boot_info;
 }
 
-static QEMUMachine virtex_machine = {
+static const QEMUMachine virtex_machine = {
     .name = "virtex-ml507",
     .desc = "Xilinx Virtex ML507 reference design",
     .init = virtex_init,
diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c
index 77a34bf..2a3346d 100644
--- a/hw/xen_machine_pv.c
+++ b/hw/xen_machine_pv.c
@@ -109,7 +109,7 @@  static void xen_init_pv(ram_addr_t ram_size,
     xen_init_display(xen_domid);
 }
 
-static QEMUMachine xenpv_machine = {
+static const QEMUMachine xenpv_machine = {
     .name = "xenpv",
     .desc = "Xen Para-virtualized PC",
     .init = xen_init_pv,