compat: replace PC_COMPAT_2_8 & HW_COMPAT_2_8 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>
This commit is contained in:
Marc-André Lureau 2018-12-12 19:36:30 +04:00
parent 3e8031525a
commit edc24ccda4
10 changed files with 87 additions and 86 deletions

View file

@ -21,6 +21,7 @@
#include "sysemu/numa.h"
#include "qemu/error-report.h"
#include "sysemu/qtest.h"
#include "hw/pci/pci.h"
GlobalProperty hw_compat_3_1[] = {
{
@ -122,6 +123,51 @@ GlobalProperty hw_compat_2_9[] = {
};
const size_t hw_compat_2_9_len = G_N_ELEMENTS(hw_compat_2_9);
GlobalProperty 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",
},
};
const size_t hw_compat_2_8_len = G_N_ELEMENTS(hw_compat_2_8);
static char *machine_get_accel(Object *obj, Error **errp)
{
MachineState *ms = MACHINE(obj);