compat: replace PC_COMPAT_2_4 & HW_COMPAT_2_4 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 fe759610d5
commit 2f99b9c273
9 changed files with 112 additions and 111 deletions

View file

@ -236,6 +236,35 @@ GlobalProperty hw_compat_2_5[] = {
};
const size_t hw_compat_2_5_len = G_N_ELEMENTS(hw_compat_2_5);
GlobalProperty hw_compat_2_4[] = {
{
.driver = "virtio-blk-device",
.property = "scsi",
.value = "true",
},{
.driver = "e1000",
.property = "extra_mac_registers",
.value = "off",
},{
.driver = "virtio-pci",
.property = "x-disable-pcie",
.value = "on",
},{
.driver = "virtio-pci",
.property = "migrate-extra",
.value = "off",
},{
.driver = "fw_cfg_mem",
.property = "dma_enabled",
.value = "off",
},{
.driver = "fw_cfg_io",
.property = "dma_enabled",
.value = "off",
}
};
const size_t hw_compat_2_4_len = G_N_ELEMENTS(hw_compat_2_4);
static char *machine_get_accel(Object *obj, Error **errp)
{
MachineState *ms = MACHINE(obj);