From ff8f261f113b55d3eb83ea9163d70a0f1ea36daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 12 Dec 2018 19:36:30 +0400 Subject: compat: replace PC_COMPAT_2_6 & HW_COMPAT_2_6 macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau Reviewed-by: Igor Mammedov Reviewed-by: Cornelia Huck Acked-by: Eduardo Habkost --- include/hw/boards.h | 3 +++ include/hw/compat.h | 15 --------------- include/hw/i386/pc.h | 23 ++--------------------- 3 files changed, 5 insertions(+), 36 deletions(-) (limited to 'include/hw') diff --git a/include/hw/boards.h b/include/hw/boards.h index ac4854db0f..1135ee23ac 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -312,4 +312,7 @@ extern const size_t hw_compat_2_8_len; extern GlobalProperty hw_compat_2_7[]; extern const size_t hw_compat_2_7_len; +extern GlobalProperty hw_compat_2_6[]; +extern const size_t hw_compat_2_6_len; + #endif diff --git a/include/hw/compat.h b/include/hw/compat.h index 7ceab17401..c744233fb6 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -1,21 +1,6 @@ #ifndef HW_COMPAT_H #define HW_COMPAT_H -#define HW_COMPAT_2_6 \ - {\ - .driver = "virtio-mmio",\ - .property = "format_transport_address",\ - .value = "off",\ - },{\ - .driver = "virtio-pci",\ - .property = "disable-modern",\ - .value = "on",\ - },{\ - .driver = "virtio-pci",\ - .property = "disable-legacy",\ - .value = "off",\ - }, - #define HW_COMPAT_2_5 \ {\ .driver = "isa-fdc",\ diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 504fbc79a9..ca62def2c9 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -318,27 +318,8 @@ extern const size_t pc_compat_2_8_len; extern GlobalProperty pc_compat_2_7[]; extern const size_t pc_compat_2_7_len; -#define PC_COMPAT_2_6 \ - HW_COMPAT_2_6 \ - {\ - .driver = TYPE_X86_CPU,\ - .property = "cpuid-0xb",\ - .value = "off",\ - },{\ - .driver = "vmxnet3",\ - .property = "romfile",\ - .value = "",\ - },\ - {\ - .driver = TYPE_X86_CPU,\ - .property = "fill-mtrr-mask",\ - .value = "off",\ - },\ - {\ - .driver = "apic-common",\ - .property = "legacy-instance-id",\ - .value = "on",\ - }, +extern GlobalProperty pc_compat_2_6[]; +extern const size_t pc_compat_2_6_len; #define PC_COMPAT_2_5 \ HW_COMPAT_2_5 -- cgit v1.2.3