]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: capabilities: Introduce QEMU_CAPS_DISK_TIMED_STATS
authorPeter Krempa <pkrempa@redhat.com>
Tue, 7 Oct 2025 12:57:50 +0000 (14:57 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 5 Nov 2025 13:27:57 +0000 (14:27 +0100)
The capability tracks support for 'stats-intervals' property of disk
frontends which enables statistics collection on the devices.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml

index bc664c74297042e554453f1f8176c06c3344a636..c6d312447a0fad9aa695fb847d8aa7492d427c7c 100644 (file)
@@ -746,6 +746,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
 
               /* 485 */
               "acpi-generic-initiator", /* QEMU_CAPS_ACPI_GENERIC_INITIATOR */
+              "disk-timed-stats", /* QEMU_CAPS_DISK_TIMED_STATS */
     );
 
 
@@ -1478,6 +1479,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioBlk[] = {
     { "queue-size", QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE, NULL },
     { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL },
     { "iothread-vq-mapping", QEMU_CAPS_VIRTIO_BLK_IOTHREAD_MAPPING, NULL },
+    { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[] = {
@@ -1509,9 +1511,11 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVfioPCI[] = {
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsSCSIDisk[] = {
     { "channel", QEMU_CAPS_SCSI_DISK_CHANNEL, NULL },
     { "rotation_rate", QEMU_CAPS_ROTATION_RATE, NULL },
+    { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsIDEDrive[] = {
+    { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPiix4PM[] = {
@@ -1523,6 +1527,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBRedir[] = {
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBStorage[] = {
+    { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL },
 };
 
 static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsKVMPit[] = {
index 4496559e4d6d83b64b35fff7de3a6ef2ad947ce8..3ca0b419fe79ed81d0904f5b8a5b0c64f4f98653 100644 (file)
@@ -727,6 +727,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
 
     /* 485 */
     QEMU_CAPS_ACPI_GENERIC_INITIATOR, /* -object acpi-generic-initiator */
+    QEMU_CAPS_DISK_TIMED_STATS, /* timed stats support ('stats-intervals' property of disk frontends) */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
index cd2a2c8aa709d3ff3385576ae12ba011c09a20f5..3d83a278c8783e980384a41d98cd4ac91b346441 100644 (file)
   <flag name='tdx-guest'/>
   <flag name='qom-list-get'/>
   <flag name='acpi-generic-initiator'/>
+  <flag name='disk-timed-stats'/>
   <version>10001050</version>
   <microcodeVersion>43100287</microcodeVersion>
   <package>v10.1.0-1969-g53b41bb789</package>