1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

qemu: Detect whether iothread polling is supported

Add a capability check for IOThread polling (all were added at the
same time, so only one check is necessary).

Based on code originally posted by Pavel Hrdina <phrdina@redhat.com>
with the only changes to include the more recent QEMU releases.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
John Ferlan 2018-10-05 15:59:49 -04:00
parent f747a2b5c4
commit 9aec374b01
20 changed files with 21 additions and 0 deletions

View File

@ -514,6 +514,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
/* 320 */
"memory-backend-memfd.hugetlb",
"iothread.poll-max-ns",
);
@ -1246,6 +1247,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
{ "nbd-server-start/arg-type/tls-creds", QEMU_CAPS_NBD_TLS },
{ "screendump/arg-type/device", QEMU_CAPS_SCREENDUMP_DEVICE },
{ "block-commit/arg-type/*top", QEMU_CAPS_ACTIVE_COMMIT },
{ "query-iothreads/ret-type/poll-max-ns", QEMU_CAPS_IOTHREAD_POLLING },
};
typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps;

View File

@ -498,6 +498,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 320 */
QEMU_CAPS_OBJECT_MEMORY_MEMFD_HUGETLB, /* -object memory-backend-memfd.hugetlb */
QEMU_CAPS_IOTHREAD_POLLING, /* -object iothread.poll-max-ns */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

View File

@ -151,6 +151,7 @@
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='iothread.poll-max-ns'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>305067</microcodeVersion>

View File

@ -150,6 +150,7 @@
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='iothread.poll-max-ns'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>384412</microcodeVersion>

View File

@ -114,6 +114,7 @@
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='zpci'/>
<flag name='iothread.poll-max-ns'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>306247</microcodeVersion>

View File

@ -192,6 +192,7 @@
<flag name='vhost-vsock'/>
<flag name='mch'/>
<flag name='egl-headless'/>
<flag name='iothread.poll-max-ns'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>364386</microcodeVersion>

View File

@ -121,6 +121,7 @@
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<flag name='zpci'/>
<flag name='iothread.poll-max-ns'/>
<version>2011000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>345099</microcodeVersion>

View File

@ -198,6 +198,7 @@
<flag name='mch'/>
<flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<flag name='iothread.poll-max-ns'/>
<version>2011000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>368875</microcodeVersion>

View File

@ -164,6 +164,7 @@
<flag name='vfio-pci.display'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>345725</microcodeVersion>

View File

@ -162,6 +162,7 @@
<flag name='vfio-pci.display'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>426509</microcodeVersion>

View File

@ -131,6 +131,7 @@
<flag name='zpci'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<version>2012000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>375102</microcodeVersion>

View File

@ -205,6 +205,7 @@
<flag name='vfio-pci.display'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>414371</microcodeVersion>

View File

@ -142,6 +142,7 @@
<flag name='hda-output'/>
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
<flag name='iothread.poll-max-ns'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>349056</microcodeVersion>

View File

@ -108,6 +108,7 @@
<flag name='blockdev-del'/>
<flag name='vhost-vsock'/>
<flag name='zpci'/>
<flag name='iothread.poll-max-ns'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>267973</microcodeVersion>

View File

@ -186,6 +186,7 @@
<flag name='vmgenid'/>
<flag name='vhost-vsock'/>
<flag name='mch'/>
<flag name='iothread.poll-max-ns'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>340375</microcodeVersion>

View File

@ -162,6 +162,7 @@
<flag name='vfio-pci.display'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<version>2012050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>444946</microcodeVersion>

View File

@ -102,6 +102,7 @@
<flag name='egl-headless'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>

View File

@ -102,6 +102,7 @@
<flag name='egl-headless'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>

View File

@ -133,6 +133,7 @@
<flag name='zpci'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>388416</microcodeVersion>

View File

@ -207,6 +207,7 @@
<flag name='vfio-pci.display'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>425972</microcodeVersion>