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 | 8995dd9009a4f0845393c102098dc94e14806c37 (patch) | |
tree | 0b2e85cd0acce6dabe85b68109f027e47011bd0d /include | |
parent | 2f99b9c273ded76211ddb445b273ce854d469033 (diff) |
compat: replace PC_COMPAT_2_3 & HW_COMPAT_2_3 macros
Use static arrays instead. I decided to rename the conflicting
pc_compat_2_3() function with pc_compat_2_3_fn().
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.h | 3 | ||||
-rw-r--r-- | include/hw/compat.h | 39 | ||||
-rw-r--r-- | include/hw/i386/pc.h | 88 |
3 files changed, 6 insertions, 124 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 254b7d8919..e7e3d2bc3c 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -321,4 +321,7 @@ extern const size_t hw_compat_2_5_len; extern GlobalProperty hw_compat_2_4[]; extern const size_t hw_compat_2_4_len; +extern GlobalProperty hw_compat_2_3[]; +extern const size_t hw_compat_2_3_len; + #endif diff --git a/include/hw/compat.h b/include/hw/compat.h index 05ff05e159..fbe64d5983 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -1,45 +1,6 @@ #ifndef HW_COMPAT_H #define HW_COMPAT_H -#define HW_COMPAT_2_3 \ - {\ - .driver = "virtio-blk-pci",\ - .property = "any_layout",\ - .value = "off",\ - },{\ - .driver = "virtio-balloon-pci",\ - .property = "any_layout",\ - .value = "off",\ - },{\ - .driver = "virtio-serial-pci",\ - .property = "any_layout",\ - .value = "off",\ - },{\ - .driver = "virtio-9p-pci",\ - .property = "any_layout",\ - .value = "off",\ - },{\ - .driver = "virtio-rng-pci",\ - .property = "any_layout",\ - .value = "off",\ - },{\ - .driver = TYPE_PCI_DEVICE,\ - .property = "x-pcie-lnksta-dllla",\ - .value = "off",\ - },{\ - .driver = "migration",\ - .property = "send-configuration",\ - .value = "off",\ - },{\ - .driver = "migration",\ - .property = "send-section-footer",\ - .value = "off",\ - },{\ - .driver = "migration",\ - .property = "store-global-state",\ - .value = "off",\ - }, - #define HW_COMPAT_2_2 \ /* empty */ diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index a9045f6bea..def40cd545 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -327,6 +327,9 @@ extern const size_t pc_compat_2_5_len; extern GlobalProperty pc_compat_2_4[]; extern const size_t pc_compat_2_4_len; +extern GlobalProperty pc_compat_2_3[]; +extern const size_t pc_compat_2_3_len; + /* Helper for setting model-id for CPU models that changed model-id * depending on QEMU versions up to QEMU 2.4. */ @@ -347,91 +350,6 @@ extern const size_t pc_compat_2_4_len; .value = "QEMU Virtual CPU version " v,\ }, -#define PC_COMPAT_2_3 \ - HW_COMPAT_2_3 \ - PC_CPU_MODEL_IDS("2.3.0") \ - {\ - .driver = TYPE_X86_CPU,\ - .property = "arat",\ - .value = "off",\ - },{\ - .driver = "qemu64" "-" TYPE_X86_CPU,\ - .property = "min-level",\ - .value = stringify(4),\ - },{\ - .driver = "kvm64" "-" TYPE_X86_CPU,\ - .property = "min-level",\ - .value = stringify(5),\ - },{\ - .driver = "pentium3" "-" TYPE_X86_CPU,\ - .property = "min-level",\ - .value = stringify(2),\ - },{\ - .driver = "n270" "-" TYPE_X86_CPU,\ - .property = "min-level",\ - .value = stringify(5),\ - },{\ - .driver = "Conroe" "-" TYPE_X86_CPU,\ - .property = "min-level",\ - .value = stringify(4),\ - },{\ - .driver = "Penryn" "-" TYPE_X86_CPU,\ - .property = "min-level",\ - .value = stringify(4),\ - },{\ - .driver = "Nehalem" "-" TYPE_X86_CPU,\ - .property = "min-level",\ - .value = stringify(4),\ - },{\ - .driver = "n270" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "Penryn" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "Conroe" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "Nehalem" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "Westmere" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "SandyBridge" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "IvyBridge" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "Haswell" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "Haswell-noTSX" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "Broadwell" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = "Broadwell-noTSX" "-" TYPE_X86_CPU,\ - .property = "min-xlevel",\ - .value = stringify(0x8000000a),\ - },{\ - .driver = TYPE_X86_CPU,\ - .property = "kvm-no-smi-migration",\ - .value = "on",\ - }, - #define PC_COMPAT_2_2 \ HW_COMPAT_2_2 \ PC_CPU_MODEL_IDS("2.2.0") \ |