qemu: Add I/O thread support info into domain capabilities

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2017-10-19 14:19:38 +02:00
parent 25f4ee5179
commit 8525b9694e
25 changed files with 61 additions and 0 deletions

View File

@ -208,6 +208,22 @@
</dd>
</dl>
<h3><a id="elementsIothread">CPU configuration</a></h3>
<p>
The <code>iothread</code> elements indicates whether or not
<a href="formatdomain.html#elementsIOThreadsAllocation">I/O threads</a>
are supported.
</p>
<pre>
&lt;domainCapabilities&gt;
...
&lt;iothread supported='yes'/&gt;
...
&lt;domainCapabilities&gt;
</pre>
<h3><a id="elementsDevices">Devices</a></h3>
<p>

View File

@ -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'/>

View File

@ -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);

View File

@ -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;

View File

@ -4639,6 +4639,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,
@ -4873,6 +4883,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 ||

View File

@ -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'/>

View File

@ -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>

View File

@ -4,6 +4,7 @@
<machine>xenfv</machine>
<arch>x86_64</arch>
<vcpu max='128'/>
<iothreads supported='no'/>
<os supported='yes'>
<loader supported='yes'>
<value>/usr/lib/xen/boot/hvmloader</value>

View File

@ -4,6 +4,7 @@
<machine>xenpv</machine>
<arch>x86_64</arch>
<vcpu max='512'/>
<iothreads supported='no'/>
<os supported='yes'>
<loader supported='no'/>
</os>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>