Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- docs/schemas/domaincaps.rng | 10 ++++++++++ src/conf/domain_capabilities.c | 3 +++ src/conf/domain_capabilities.h | 1 + src/qemu/qemu_capabilities.c | 11 +++++++++++ tests/domaincapsschemadata/basic.xml | 1 + tests/domaincapsschemadata/full.xml | 1 + tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml | 1 + .../domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml | 1 + tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml | 1 + tests/domaincapsschemadata/qemu_2.12.0.s390x.xml | 1 + tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml | 1 + .../domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml | 1 + tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml | 1 + tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml | 1 + tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.7.0.s390x.xml | 1 + tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.8.0.s390x.xml | 1 + tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 1 + 22 files changed, 43 insertions(+) diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng index 39053181eb9a..049b2ae7b64f 100644 --- a/docs/schemas/domaincaps.rng +++ b/docs/schemas/domaincaps.rng @@ -28,6 +28,9 @@ <optional> <ref name='vcpu'/> </optional> + <optional> + <ref name='iothreads'/> + </optional> <optional> <ref name='os'/> </optional> @@ -53,6 +56,13 @@ </element> </define> + <define name='iothreads'> + <element name='iothreads'> + <ref name='supported'/> + <empty/> + </element> + </define> + <define name='loader'> <element name='loader'> <ref name='supported'/> diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index bebbaf44d00e..f18bea99d63f 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -562,6 +562,9 @@ virDomainCapsFormat(virDomainCapsPtr const caps) if (caps->maxvcpus) virBufferAsprintf(&buf, "<vcpu max='%d'/>\n", caps->maxvcpus); + virBufferAsprintf(&buf, "<iothreads supported='%s'/>\n", + caps->iothreads ? "yes" : "no"); + virDomainCapsOSFormat(&buf, &caps->os); virDomainCapsCPUFormat(&buf, &caps->cpu); diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index fa4c1e442f57..3b5ce214d636 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -147,6 +147,7 @@ struct _virDomainCaps { /* Some machine specific info */ int maxvcpus; + bool iothreads; /* Whether I/O threads are supported or not. */ virDomainCapsOS os; virDomainCapsCPU cpu; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 833c75514c25..00634abb1649 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4632,6 +4632,16 @@ virQEMUCapsFillDomainCPUCaps(virCapsPtr caps, } +static int +virQEMUCapsFillDomainIOThreadCaps(virQEMUCapsPtr qemuCaps, + virDomainCapsPtr domCaps) +{ + domCaps->iothreads = virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD); + + return 0; +} + + static int virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCapsPtr qemuCaps, const char *machine, @@ -4866,6 +4876,7 @@ virQEMUCapsFillDomainCaps(virCapsPtr caps, if (virQEMUCapsFillDomainOSCaps(os, firmwares, nfirmwares) < 0 || virQEMUCapsFillDomainCPUCaps(caps, qemuCaps, domCaps) < 0 || + virQEMUCapsFillDomainIOThreadCaps(qemuCaps, domCaps) < 0 || virQEMUCapsFillDomainDeviceDiskCaps(qemuCaps, domCaps->machine, disk) < 0 || virQEMUCapsFillDomainDeviceGraphicsCaps(qemuCaps, graphics) < 0 || diff --git a/tests/domaincapsschemadata/basic.xml b/tests/domaincapsschemadata/basic.xml index 6b788d9144c8..7f9582430a7a 100644 --- a/tests/domaincapsschemadata/basic.xml +++ b/tests/domaincapsschemadata/basic.xml @@ -3,6 +3,7 @@ <domain>uml</domain> <machine>my-machine-type</machine> <arch>x86_64</arch> + <iothreads supported='no'/> <os supported='no'/> <cpu> <mode name='host-passthrough' supported='no'/> diff --git a/tests/domaincapsschemadata/full.xml b/tests/domaincapsschemadata/full.xml index ab6ef9f2ef17..b97bc883262a 100644 --- a/tests/domaincapsschemadata/full.xml +++ b/tests/domaincapsschemadata/full.xml @@ -4,6 +4,7 @@ <machine>my-machine-type</machine> <arch>x86_64</arch> <vcpu max='255'/> + <iothreads supported='no'/> <os supported='yes'> <loader supported='yes'> <value>/foo/bar</value> diff --git a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml index 8d1ad865703e..d71d948477ef 100644 --- a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml @@ -4,6 +4,7 @@ <machine>pc-i440fx-1.7</machine> <arch>x86_64</arch> <vcpu max='255'/> + <iothreads supported='no'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml b/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml index 9cba942fbf8e..9feceeea74c6 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml @@ -4,6 +4,7 @@ <machine>virt-2.12</machine> <arch>aarch64</arch> <vcpu max='255'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml b/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml index 4029e9e386a9..62f2d4f78a6e 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml @@ -4,6 +4,7 @@ <machine>pseries-2.12</machine> <arch>ppc64</arch> <vcpu max='1024'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml index 50680c1ef8d2..be505ee331a4 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml @@ -4,6 +4,7 @@ <machine>s390-ccw-virtio-2.12</machine> <arch>s390x</arch> <vcpu max='248'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml index 851d914bc9c6..84a83551ad42 100644 --- a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml @@ -4,6 +4,7 @@ <machine>pc-i440fx-2.12</machine> <arch>x86_64</arch> <vcpu max='255'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml b/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml index 7c019b230868..b3dc0dd8004b 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml @@ -4,6 +4,7 @@ <machine>virt-2.6</machine> <arch>aarch64</arch> <vcpu max='255'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml index 3b142806217b..13bb19198d38 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml @@ -4,6 +4,7 @@ <machine>integratorcp</machine> <arch>aarch64</arch> <vcpu max='1'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml b/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml index 98c72d36de04..d9a243d9d573 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml @@ -4,6 +4,7 @@ <machine>pseries-2.6</machine> <arch>ppc64</arch> <vcpu max='255'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml index de81886237ee..7eabf6756b89 100644 --- a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml @@ -4,6 +4,7 @@ <machine>pc-i440fx-2.6</machine> <arch>x86_64</arch> <vcpu max='255'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml index b93d00ece197..c2045263530f 100644 --- a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml @@ -4,6 +4,7 @@ <machine>s390-ccw-virtio-2.7</machine> <arch>s390x</arch> <vcpu max='248'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml index d860cd833fed..93e0a610f6ce 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml @@ -4,6 +4,7 @@ <machine>pc-i440fx-2.8</machine> <arch>x86_64</arch> <vcpu max='255'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml index ee40d1e84ec3..6555e99c68a3 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml @@ -4,6 +4,7 @@ <machine>s390-ccw-virtio-2.8</machine> <arch>s390x</arch> <vcpu max='248'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml index 33161f7b8234..2a6edd9a0f80 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml @@ -4,6 +4,7 @@ <machine>pc-i440fx-2.8</machine> <arch>x86_64</arch> <vcpu max='255'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml index 07e1db641a76..aef8a90f3930 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml @@ -4,6 +4,7 @@ <machine>pc-q35-2.9</machine> <arch>x86_64</arch> <vcpu max='288'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml index 6c2bbac190c7..e4afdeedc4e6 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml @@ -4,6 +4,7 @@ <machine>pc-i440fx-2.9</machine> <arch>x86_64</arch> <vcpu max='255'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> diff --git a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml index 2fc3b721389d..8f0f4fb7369b 100644 --- a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml @@ -4,6 +4,7 @@ <machine>pc-i440fx-2.9</machine> <arch>x86_64</arch> <vcpu max='255'/> + <iothreads supported='yes'/> <os supported='yes'> <loader supported='yes'> <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> -- 2.17.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list