aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/virt.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/virt.c')
-rw-r--r--hw/arm/virt.c94
1 files changed, 40 insertions, 54 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 275ef8bc02..19bec3fe59 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1872,98 +1872,88 @@ static void virt_machine_4_0_options(MachineClass *mc)
}
DEFINE_VIRT_MACHINE_AS_LATEST(4, 0)
-static GlobalProperty virt_compat_3_1[] = {
- HW_COMPAT_3_1
-};
-
static void virt_machine_3_1_options(MachineClass *mc)
{
+ static GlobalProperty compat[] = {
+ HW_COMPAT_3_1
+ };
+
virt_machine_4_0_options(mc);
- compat_props_add(mc->compat_props,
- virt_compat_3_1, G_N_ELEMENTS(virt_compat_3_1));
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
}
DEFINE_VIRT_MACHINE(3, 1)
-static GlobalProperty virt_compat_3_0[] = {
- HW_COMPAT_3_0
-};
-
static void virt_machine_3_0_options(MachineClass *mc)
{
+ static GlobalProperty compat[] = {
+ HW_COMPAT_3_0
+ };
+
virt_machine_3_1_options(mc);
- compat_props_add(mc->compat_props,
- virt_compat_3_0, G_N_ELEMENTS(virt_compat_3_0));
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
}
DEFINE_VIRT_MACHINE(3, 0)
-static GlobalProperty virt_compat_2_12[] = {
- HW_COMPAT_2_12
-};
-
static void virt_machine_2_12_options(MachineClass *mc)
{
VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
+ static GlobalProperty compat[] = {
+ HW_COMPAT_2_12
+ };
virt_machine_3_0_options(mc);
- compat_props_add(mc->compat_props,
- virt_compat_2_12, G_N_ELEMENTS(virt_compat_2_12));
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
vmc->no_highmem_ecam = true;
mc->max_cpus = 255;
}
DEFINE_VIRT_MACHINE(2, 12)
-static GlobalProperty virt_compat_2_11[] = {
- HW_COMPAT_2_11
-};
-
static void virt_machine_2_11_options(MachineClass *mc)
{
VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
+ static GlobalProperty compat[] = {
+ HW_COMPAT_2_11
+ };
virt_machine_2_12_options(mc);
- compat_props_add(mc->compat_props,
- virt_compat_2_11, G_N_ELEMENTS(virt_compat_2_11));
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
vmc->smbios_old_sys_ver = true;
}
DEFINE_VIRT_MACHINE(2, 11)
-static GlobalProperty virt_compat_2_10[] = {
- HW_COMPAT_2_10
-};
-
static void virt_machine_2_10_options(MachineClass *mc)
{
+ static GlobalProperty compat[] = {
+ HW_COMPAT_2_10
+ };
+
virt_machine_2_11_options(mc);
- compat_props_add(mc->compat_props,
- virt_compat_2_10, G_N_ELEMENTS(virt_compat_2_10));
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
/* before 2.11 we never faulted accesses to bad addresses */
mc->ignore_memory_transaction_failures = true;
}
DEFINE_VIRT_MACHINE(2, 10)
-static GlobalProperty virt_compat_2_9[] = {
- HW_COMPAT_2_9
-};
-
static void virt_machine_2_9_options(MachineClass *mc)
{
+ static GlobalProperty compat[] = {
+ HW_COMPAT_2_9
+ };
+
virt_machine_2_10_options(mc);
- compat_props_add(mc->compat_props,
- virt_compat_2_9, G_N_ELEMENTS(virt_compat_2_9));
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
}
DEFINE_VIRT_MACHINE(2, 9)
-static GlobalProperty virt_compat_2_8[] = {
- HW_COMPAT_2_8
-};
-
static void virt_machine_2_8_options(MachineClass *mc)
{
VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
+ static GlobalProperty compat[] = {
+ HW_COMPAT_2_8
+ };
virt_machine_2_9_options(mc);
- compat_props_add(mc->compat_props,
- virt_compat_2_8, G_N_ELEMENTS(virt_compat_2_8));
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
/* For 2.8 and earlier we falsely claimed in the DT that
* our timers were edge-triggered, not level-triggered.
*/
@@ -1971,17 +1961,15 @@ static void virt_machine_2_8_options(MachineClass *mc)
}
DEFINE_VIRT_MACHINE(2, 8)
-static GlobalProperty virt_compat_2_7[] = {
- HW_COMPAT_2_7
-};
-
static void virt_machine_2_7_options(MachineClass *mc)
{
VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
+ static GlobalProperty compat[] = {
+ HW_COMPAT_2_7
+ };
virt_machine_2_8_options(mc);
- compat_props_add(mc->compat_props,
- virt_compat_2_7, G_N_ELEMENTS(virt_compat_2_7));
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
/* ITS was introduced with 2.8 */
vmc->no_its = true;
/* Stick with 1K pages for migration compatibility */
@@ -1989,17 +1977,15 @@ static void virt_machine_2_7_options(MachineClass *mc)
}
DEFINE_VIRT_MACHINE(2, 7)
-static GlobalProperty virt_compat_2_6[] = {
- HW_COMPAT_2_6
-};
-
static void virt_machine_2_6_options(MachineClass *mc)
{
VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
+ static GlobalProperty compat[] = {
+ HW_COMPAT_2_6
+ };
virt_machine_2_7_options(mc);
- compat_props_add(mc->compat_props,
- virt_compat_2_6, G_N_ELEMENTS(virt_compat_2_6));
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
vmc->disallow_affinity_adjustment = true;
/* Disable PMU for 2.6 as PMU support was first introduced in 2.7 */
vmc->no_pmu = true;