summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-12-12 19:36:30 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2019-01-07 16:18:41 +0400
commitddb3235de10a9a480b7a83a2ecee2ca9040ba845 (patch)
tree8115cf8da1bdf28bf7838adbba594eea16053b6f /include
parentabd93cc7df8521d463c24b2106fdde4f40a3fdd5 (diff)
downloadfocaccia-qemu-ddb3235de10a9a480b7a83a2ecee2ca9040ba845.tar.gz
focaccia-qemu-ddb3235de10a9a480b7a83a2ecee2ca9040ba845.zip
compat: replace PC_COMPAT_3_0 & HW_COMPAT_3_0 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 'include')
-rw-r--r--include/hw/boards.h3
-rw-r--r--include/hw/compat.h3
-rw-r--r--include/hw/i386/pc.h17
3 files changed, 5 insertions, 18 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index b9a5c2d087..aaa57f1f6b 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -291,4 +291,7 @@ struct MachineState {
 extern GlobalProperty hw_compat_3_1[];
 extern const size_t hw_compat_3_1_len;
 
+extern GlobalProperty hw_compat_3_0[];
+extern const size_t hw_compat_3_0_len;
+
 #endif
diff --git a/include/hw/compat.h b/include/hw/compat.h
index 6f4d5fc647..c08f4040bb 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -1,9 +1,6 @@
 #ifndef HW_COMPAT_H
 #define HW_COMPAT_H
 
-#define HW_COMPAT_3_0 \
-    /* empty */
-
 #define HW_COMPAT_2_12 \
     {\
         .driver   = "migration",\
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index dd1d6fd0f3..197131ff9a 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -297,21 +297,8 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
 extern GlobalProperty pc_compat_3_1[];
 extern const size_t pc_compat_3_1_len;
 
-#define PC_COMPAT_3_0 \
-    HW_COMPAT_3_0 \
-    {\
-        .driver   = TYPE_X86_CPU,\
-        .property = "x-hv-synic-kvm-only",\
-        .value    = "on",\
-    },{\
-        .driver   = "Skylake-Server" "-" TYPE_X86_CPU,\
-        .property = "pku",\
-        .value    = "off",\
-    },{\
-        .driver   = "Skylake-Server-IBRS" "-" TYPE_X86_CPU,\
-        .property = "pku",\
-        .value    = "off",\
-    },
+extern GlobalProperty pc_compat_3_0[];
+extern const size_t pc_compat_3_0_len;
 
 #define PC_COMPAT_2_12 \
     HW_COMPAT_2_12 \