From edc24ccda4bb4357304bad7910a5039d2dac8daf Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Wed, 12 Dec 2018 19:36:30 +0400 Subject: compat: replace PC_COMPAT_2_8 & HW_COMPAT_2_8 macros 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 | 43 ------------------------------------------- include/hw/i386/pc.h | 29 ++--------------------------- 3 files changed, 5 insertions(+), 70 deletions(-) (limited to 'include') diff --git a/include/hw/boards.h b/include/hw/boards.h index 0e69350939..03278a8c39 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -306,4 +306,7 @@ extern const size_t hw_compat_2_10_len; extern GlobalProperty hw_compat_2_9[]; extern const size_t hw_compat_2_9_len; +extern GlobalProperty hw_compat_2_8[]; +extern const size_t hw_compat_2_8_len; + #endif diff --git a/include/hw/compat.h b/include/hw/compat.h index ef154ca470..65d6748054 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -1,49 +1,6 @@ #ifndef HW_COMPAT_H #define HW_COMPAT_H -#define HW_COMPAT_2_8 \ - {\ - .driver = "fw_cfg_mem",\ - .property = "x-file-slots",\ - .value = stringify(0x10),\ - },{\ - .driver = "fw_cfg_io",\ - .property = "x-file-slots",\ - .value = stringify(0x10),\ - },{\ - .driver = "pflash_cfi01",\ - .property = "old-multiple-chip-handling",\ - .value = "on",\ - },{\ - .driver = "pci-bridge",\ - .property = "shpc",\ - .value = "on",\ - },{\ - .driver = TYPE_PCI_DEVICE,\ - .property = "x-pcie-extcap-init",\ - .value = "off",\ - },{\ - .driver = "virtio-pci",\ - .property = "x-pcie-deverr-init",\ - .value = "off",\ - },{\ - .driver = "virtio-pci",\ - .property = "x-pcie-lnkctl-init",\ - .value = "off",\ - },{\ - .driver = "virtio-pci",\ - .property = "x-pcie-pm-init",\ - .value = "off",\ - },{\ - .driver = "cirrus-vga",\ - .property = "vgamem_mb",\ - .value = "8",\ - },{\ - .driver = "isa-cirrus-vga",\ - .property = "vgamem_mb",\ - .value = "8",\ - }, - #define HW_COMPAT_2_7 \ {\ .driver = "virtio-pci",\ diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index fb79f0b988..12c47d2506 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -312,33 +312,8 @@ extern const size_t pc_compat_2_10_len; extern GlobalProperty pc_compat_2_9[]; extern const size_t pc_compat_2_9_len; -#define PC_COMPAT_2_8 \ - HW_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",\ - }, +extern GlobalProperty pc_compat_2_8[]; +extern const size_t pc_compat_2_8_len; #define PC_COMPAT_2_7 \ HW_COMPAT_2_7 \ -- cgit v1.2.3-55-g7522