summaryrefslogtreecommitdiffstats
path: root/hw/i386
diff options
context:
space:
mode:
authorMarc-André Lureau2018-12-12 16:36:30 +0100
committerMarc-André Lureau2019-01-07 13:18:41 +0100
commit43df70a9ddfc40961188bf1c6f67fed3b899b8da (patch)
treeb1438ab3cfbeaac120df707d6f61d730ba13a2bd /hw/i386
parentcompat: replace PC_COMPAT_2_12 & HW_COMPAT_2_12 macros (diff)
downloadqemu-43df70a9ddfc40961188bf1c6f67fed3b899b8da.tar.gz
qemu-43df70a9ddfc40961188bf1c6f67fed3b899b8da.tar.xz
qemu-43df70a9ddfc40961188bf1c6f67fed3b899b8da.zip
compat: replace PC_COMPAT_2_11 & HW_COMPAT_2_11 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.c13
-rw-r--r--hw/i386/pc_piix.c7
-rw-r--r--hw/i386/pc_q35.c7
3 files changed, 17 insertions, 10 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 031602a005..563ba90202 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -156,6 +156,19 @@ GlobalProperty pc_compat_2_12[] = {
};
const size_t pc_compat_2_12_len = G_N_ELEMENTS(pc_compat_2_12);
+GlobalProperty pc_compat_2_11[] = {
+ {
+ .driver = TYPE_X86_CPU,
+ .property = "x-migrate-smi-count",
+ .value = "off",
+ },{
+ .driver = "Skylake-Server" "-" TYPE_X86_CPU,
+ .property = "clflushopt",
+ .value = "off",
+ },
+};
+const size_t pc_compat_2_11_len = G_N_ELEMENTS(pc_compat_2_11);
+
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 fd3906cda6..aeb51a2772 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -472,12 +472,9 @@ DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12", NULL,
static void pc_i440fx_2_11_machine_options(MachineClass *m)
{
- static GlobalProperty compat[] = {
- PC_COMPAT_2_11
- };
-
pc_i440fx_2_12_machine_options(m);
- compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat));
+ compat_props_add(m->compat_props, hw_compat_2_11, hw_compat_2_11_len);
+ compat_props_add(m->compat_props, pc_compat_2_11, pc_compat_2_11_len);
}
DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11", NULL,
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 7928f703d0..fd3187003a 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -356,14 +356,11 @@ DEFINE_Q35_MACHINE(v2_12, "pc-q35-2.12", NULL,
static void pc_q35_2_11_machine_options(MachineClass *m)
{
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
- static GlobalProperty compat[] = {
- PC_COMPAT_2_11
- };
-
pc_q35_2_12_machine_options(m);
pcmc->default_nic_model = "e1000";
- compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat));
+ compat_props_add(m->compat_props, hw_compat_2_11, hw_compat_2_11_len);
+ compat_props_add(m->compat_props, pc_compat_2_11, pc_compat_2_11_len);
}
DEFINE_Q35_MACHINE(v2_11, "pc-q35-2.11", NULL,