diff options
author | Cornelia Huck <cohuck@redhat.com> | 2020-04-29 16:46:05 +0200 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2020-05-06 10:12:16 -0400 |
commit | 541aaa1df80df465c7dc934dc8cf57c0e3dfd6c3 (patch) | |
tree | 6b4ce0b9f7f8cff0a3694487c15cb944e8dd4405 /hw/i386 | |
parent | b13d31ca17cc22c79b2dc29abd030802e4cc36f4 (diff) |
hw: add compat machines for 5.1
Add 5.1 machine types for arm/i440fx/q35/s390x/spapr.
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Message-id: 20200429144605.7262-1-cohuck@redhat.com
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/pc.c | 3 | ||||
-rw-r--r-- | hw/i386/pc_piix.c | 14 | ||||
-rw-r--r-- | hw/i386/pc_q35.c | 13 |
3 files changed, 28 insertions, 2 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f6b8431c8b..97e345faea 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -95,6 +95,9 @@ #include "fw_cfg.h" #include "trace.h" +GlobalProperty pc_compat_5_0[] = {}; +const size_t pc_compat_5_0_len = G_N_ELEMENTS(pc_compat_5_0); + GlobalProperty pc_compat_4_2[] = { { "mch", "smbase-smram", "off" }, }; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index b75087d71b..3862e5120e 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -421,7 +421,7 @@ static void pc_i440fx_machine_options(MachineClass *m) machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); } -static void pc_i440fx_5_0_machine_options(MachineClass *m) +static void pc_i440fx_5_1_machine_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); pc_i440fx_machine_options(m); @@ -430,6 +430,18 @@ static void pc_i440fx_5_0_machine_options(MachineClass *m) pcmc->default_cpu_version = 1; } +DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1", NULL, + pc_i440fx_5_1_machine_options); + +static void pc_i440fx_5_0_machine_options(MachineClass *m) +{ + pc_i440fx_5_1_machine_options(m); + m->alias = NULL; + m->is_default = false; + compat_props_add(m->compat_props, hw_compat_5_0, hw_compat_5_0_len); + compat_props_add(m->compat_props, pc_compat_5_0, pc_compat_5_0_len); +} + DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0", NULL, pc_i440fx_5_0_machine_options); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index d2806c1b29..3349e38a4c 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -351,7 +351,7 @@ static void pc_q35_machine_options(MachineClass *m) m->max_cpus = 288; } -static void pc_q35_5_0_machine_options(MachineClass *m) +static void pc_q35_5_1_machine_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); pc_q35_machine_options(m); @@ -359,6 +359,17 @@ static void pc_q35_5_0_machine_options(MachineClass *m) pcmc->default_cpu_version = 1; } +DEFINE_Q35_MACHINE(v5_1, "pc-q35-5.1", NULL, + pc_q35_5_1_machine_options); + +static void pc_q35_5_0_machine_options(MachineClass *m) +{ + pc_q35_5_1_machine_options(m); + m->alias = NULL; + compat_props_add(m->compat_props, hw_compat_5_0, hw_compat_5_0_len); + compat_props_add(m->compat_props, pc_compat_5_0, pc_compat_5_0_len); +} + DEFINE_Q35_MACHINE(v5_0, "pc-q35-5.0", NULL, pc_q35_5_0_machine_options); |