For some reason, the bootindex parameter wasn't included in early versions of vfio support (qemu 1.4) so we have to check for it separately from vfio itself. --- src/qemu/qemu_capabilities.c | 7 +++++++ src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d5df4b3..2acf535 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -224,6 +224,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "nvram", /* 140 */ "pci-bridge", /* 141 */ "vfio-pci", /* 142 */ + "vfio-pci.bootindex", /* 143 */ ); struct _virQEMUCaps { @@ -1376,6 +1377,10 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsPciAssign[] = { { "bootindex", QEMU_CAPS_PCI_BOOTINDEX }, }; +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVfioPci[] = { + { "bootindex", QEMU_CAPS_VFIO_PCI_BOOTINDEX }, +}; + static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsScsiDisk[] = { { "channel", QEMU_CAPS_SCSI_DISK_CHANNEL }, { "wwn", QEMU_CAPS_SCSI_DISK_WWN }, @@ -1422,6 +1427,8 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = { ARRAY_CARDINALITY(virQEMUCapsObjectPropsPciAssign) }, { "kvm-pci-assign", virQEMUCapsObjectPropsPciAssign, ARRAY_CARDINALITY(virQEMUCapsObjectPropsPciAssign) }, + { "vfio-pci", virQEMUCapsObjectPropsVfioPci, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsVfioPci) }, { "scsi-disk", virQEMUCapsObjectPropsScsiDisk, ARRAY_CARDINALITY(virQEMUCapsObjectPropsScsiDisk) }, { "ide-drive", virQEMUCapsObjectPropsIDEDrive, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 49ee505..213f63c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -181,7 +181,7 @@ enum virQEMUCapsFlags { QEMU_CAPS_DEVICE_NVRAM = 140, /* -global spapr-nvram.reg=xxxx */ QEMU_CAPS_DEVICE_PCI_BRIDGE = 141, /* -device pci-bridge */ QEMU_CAPS_DEVICE_VFIO_PCI = 142, /* -device vfio-pci */ - + QEMU_CAPS_VFIO_PCI_BOOTINDEX = 143, /* bootindex param for vfio-pci device */ QEMU_CAPS_LAST, /* this must always be the last item */ }; -- 1.7.11.7 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list