Add the capability to detect if the qemu binary can support the feature
to use throttling.group.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
9 files changed, 10 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 7a8202a..a3248ab 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -347,6 +347,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"machine-iommu",
"virtio-vga",
"drive-iotune-max-length",
+ "drive-iotune-group",
);
@@ -2845,6 +2846,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] =
{
{ "name", "guest", QEMU_CAPS_NAME_GUEST },
{ "spice", "unix", QEMU_CAPS_SPICE_UNIX },
{ "drive", "throttling.bps-total-max-length",
QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH },
+ { "drive", "throttling.group", QEMU_CAPS_DRIVE_IOTUNE_GROUP },
};
static int
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 6e7a855..0e51df6 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -381,6 +381,7 @@ typedef enum {
QEMU_CAPS_MACHINE_IOMMU, /* -machine iommu=on */
QEMU_CAPS_DEVICE_VIRTIO_VGA, /* -device virtio-vga */
QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH, /* -drive bps_max_length = and friends */
+ QEMU_CAPS_DRIVE_IOTUNE_GROUP, /* -drive throttling.group=<name> */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
index 3162758..e65ebe6 100644
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
@@ -181,6 +181,7 @@
<flag name='virtio-pci-disable-legacy'/>
<flag name='machine-iommu'/>
<flag name='virtio-vga'/>
+ <flag name='drive-iotune-group'/>
<version>2004000</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
index 62d42c3..fc00271 100644
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
@@ -186,6 +186,7 @@
<flag name='virtio-pci-disable-legacy'/>
<flag name='machine-iommu'/>
<flag name='virtio-vga'/>
+ <flag name='drive-iotune-group'/>
<version>2005000</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
index 5c6a709..a397383 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
@@ -159,6 +159,7 @@
<flag name='smm'/>
<flag name='virtio-pci-disable-legacy'/>
<flag name='drive-iotune-max-length'/>
+ <flag name='drive-iotune-group'/>
<version>2005094</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
index 6ba97be..4ac2eb5 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
@@ -159,6 +159,7 @@
<flag name='smm'/>
<flag name='virtio-pci-disable-legacy'/>
<flag name='drive-iotune-max-length'/>
+ <flag name='drive-iotune-group'/>
<version>2005094</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
index 9174f58..7b38c30 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
@@ -154,6 +154,7 @@
<flag name='virtio-pci-disable-legacy'/>
<flag name='virtio-vga'/>
<flag name='drive-iotune-max-length'/>
+ <flag name='drive-iotune-group'/>
<version>2005094</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
index 1c309df..4d03d7a 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
@@ -193,6 +193,7 @@
<flag name='machine-iommu'/>
<flag name='virtio-vga'/>
<flag name='drive-iotune-max-length'/>
+ <flag name='drive-iotune-group'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
index 2f168da..e971ecd 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -194,6 +194,7 @@
<flag name='query-hotpluggable-cpus'/>
<flag name='virtio-vga'/>
<flag name='drive-iotune-max-length'/>
+ <flag name='drive-iotune-group'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.7.0)</package>
--
2.7.4