diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2015-05-15 14:18:55 -0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-05-31 16:26:42 +0200 |
commit | 25519b062c70f2afe2d2f0c262f3838a41e8bc7c (patch) | |
tree | a20e885f180b090817ea4d2db7b4620f4e472604 /hw/i386/pc_q35.c | |
parent | fddd179ab962f6f78a8493742e1068d6a620e059 (diff) |
pc: Move compat_props setting inside *_machine_options() functions
This will simplify the DEFINE_PC_MACHINE macro, and will help us to
implement reuse of PC_COMPAT_* macros through class_init function reuse,
in the future.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/pc_q35.c')
-rw-r--r-- | hw/i386/pc_q35.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 0226021b5d..dcd728cc07 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -432,80 +432,88 @@ static void pc_q35_2_4_machine_options(QEMUMachine *m) } DEFINE_PC_MACHINE(v2_4, "pc-q35-2.4", pc_q35_init, - pc_q35_2_4_machine_options, /* no compat */); + pc_q35_2_4_machine_options); static void pc_q35_2_3_machine_options(QEMUMachine *m) { pc_q35_2_4_machine_options(m); m->alias = NULL; + SET_MACHINE_COMPAT(m, PC_COMPAT_2_3); } DEFINE_PC_MACHINE(v2_3, "pc-q35-2.3", pc_q35_init_2_3, - pc_q35_2_3_machine_options, PC_COMPAT_2_3); + pc_q35_2_3_machine_options); static void pc_q35_2_2_machine_options(QEMUMachine *m) { pc_q35_2_3_machine_options(m); + SET_MACHINE_COMPAT(m, PC_COMPAT_2_2); } DEFINE_PC_MACHINE(v2_2, "pc-q35-2.2", pc_q35_init_2_2, - pc_q35_2_2_machine_options, PC_COMPAT_2_2); + pc_q35_2_2_machine_options); static void pc_q35_2_1_machine_options(QEMUMachine *m) { pc_q35_2_2_machine_options(m); m->default_display = NULL; + SET_MACHINE_COMPAT(m, PC_COMPAT_2_1); } DEFINE_PC_MACHINE(v2_1, "pc-q35-2.1", pc_q35_init_2_1, - pc_q35_2_1_machine_options, PC_COMPAT_2_1); + pc_q35_2_1_machine_options); static void pc_q35_2_0_machine_options(QEMUMachine *m) { pc_q35_2_1_machine_options(m); + SET_MACHINE_COMPAT(m, PC_COMPAT_2_0); } DEFINE_PC_MACHINE(v2_0, "pc-q35-2.0", pc_q35_init_2_0, - pc_q35_2_0_machine_options, PC_COMPAT_2_0); + pc_q35_2_0_machine_options); static void pc_q35_1_7_machine_options(QEMUMachine *m) { pc_q35_2_0_machine_options(m); m->default_machine_opts = NULL; + SET_MACHINE_COMPAT(m, PC_COMPAT_1_7); } DEFINE_PC_MACHINE(v1_7, "pc-q35-1.7", pc_q35_init_1_7, - pc_q35_1_7_machine_options, PC_COMPAT_1_7); + pc_q35_1_7_machine_options); static void pc_q35_1_6_machine_options(QEMUMachine *m) { pc_q35_machine_options(m); + SET_MACHINE_COMPAT(m, PC_COMPAT_1_6); } DEFINE_PC_MACHINE(v1_6, "pc-q35-1.6", pc_q35_init_1_6, - pc_q35_1_6_machine_options, PC_COMPAT_1_6); + pc_q35_1_6_machine_options); static void pc_q35_1_5_machine_options(QEMUMachine *m) { pc_q35_1_6_machine_options(m); + SET_MACHINE_COMPAT(m, PC_COMPAT_1_5); } DEFINE_PC_MACHINE(v1_5, "pc-q35-1.5", pc_q35_init_1_5, - pc_q35_1_5_machine_options, PC_COMPAT_1_5); + pc_q35_1_5_machine_options); static void pc_q35_1_4_machine_options(QEMUMachine *m) { pc_q35_1_5_machine_options(m); m->hot_add_cpu = NULL; + SET_MACHINE_COMPAT(m, PC_COMPAT_1_4); } DEFINE_PC_MACHINE(v1_4, "pc-q35-1.4", pc_q35_init_1_4, - pc_q35_1_4_machine_options, PC_COMPAT_1_4); + pc_q35_1_4_machine_options); |