diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-12-12 19:36:30 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-01-07 16:18:42 +0400 |
commit | edc24ccda4bb4357304bad7910a5039d2dac8daf (patch) | |
tree | 2b8124bc0ce1fbb48127db99b89578cf2322f15d /hw/i386 | |
parent | 3e8031525a7431bef796692cc626b2a69a697018 (diff) | |
download | qemu-edc24ccda4bb4357304bad7910a5039d2dac8daf.zip |
compat: replace PC_COMPAT_2_8 & HW_COMPAT_2_8 macros
Use static arrays instead.
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/pc.c | 29 | ||||
-rw-r--r-- | hw/i386/pc_piix.c | 7 | ||||
-rw-r--r-- | hw/i386/pc_q35.c | 7 |
3 files changed, 33 insertions, 10 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 3f6f5df363..b094e5b2ad 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -195,6 +195,35 @@ GlobalProperty pc_compat_2_9[] = { }; const size_t pc_compat_2_9_len = G_N_ELEMENTS(pc_compat_2_9); +GlobalProperty pc_compat_2_8[] = { + { + .driver = TYPE_X86_CPU, + .property = "tcg-cpuid", + .value = "off", + }, + { + .driver = "kvmclock", + .property = "x-mach-use-reliable-get-clock", + .value = "off", + }, + { + .driver = "ICH9-LPC", + .property = "x-smi-broadcast", + .value = "off", + }, + { + .driver = TYPE_X86_CPU, + .property = "vmware-cpuid-freq", + .value = "off", + }, + { + .driver = "Haswell-" TYPE_X86_CPU, + .property = "stepping", + .value = "1", + }, +}; +const size_t pc_compat_2_8_len = G_N_ELEMENTS(pc_compat_2_8); + void gsi_handler(void *opaque, int n, int level) { GSIState *s = opaque; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 02520bceb9..b1fa038a69 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -504,12 +504,9 @@ DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9", NULL, static void pc_i440fx_2_8_machine_options(MachineClass *m) { - static GlobalProperty compat[] = { - PC_COMPAT_2_8 - }; - pc_i440fx_2_9_machine_options(m); - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); + compat_props_add(m->compat_props, hw_compat_2_8, hw_compat_2_8_len); + compat_props_add(m->compat_props, pc_compat_2_8, pc_compat_2_8_len); } DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8", NULL, diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index e94d2d05c7..7e608b3ffb 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -390,12 +390,9 @@ DEFINE_Q35_MACHINE(v2_9, "pc-q35-2.9", NULL, static void pc_q35_2_8_machine_options(MachineClass *m) { - static GlobalProperty compat[] = { - PC_COMPAT_2_8 - }; - pc_q35_2_9_machine_options(m); - compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat)); + compat_props_add(m->compat_props, hw_compat_2_8, hw_compat_2_8_len); + compat_props_add(m->compat_props, pc_compat_2_8, pc_compat_2_8_len); } DEFINE_Q35_MACHINE(v2_8, "pc-q35-2.8", NULL, |