]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Add I/O thread support info into domain capabilities
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 19 Oct 2017 12:19:38 +0000 (14:19 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 3 May 2018 20:31:37 +0000 (22:31 +0200)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
25 files changed:
docs/formatdomaincaps.html.in
docs/schemas/domaincaps.rng
src/conf/domain_capabilities.c
src/conf/domain_capabilities.h
src/qemu/qemu_capabilities.c
tests/domaincapsschemadata/basic.xml
tests/domaincapsschemadata/full.xml
tests/domaincapsschemadata/libxl-xenfv.xml
tests/domaincapsschemadata/libxl-xenpv.xml
tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml
tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml
tests/domaincapsschemadata/qemu_2.12.0.s390x.xml
tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml
tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml
tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml
tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml
tests/domaincapsschemadata/qemu_2.7.0.s390x.xml
tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml
tests/domaincapsschemadata/qemu_2.8.0.s390x.xml
tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml
tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml
tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml
tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml

index 027e115645c9b256769782cfaa4839c450b6c6fb..f8724a24578e78d39a9db6df5a967b22689b1b64 100644 (file)
       </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>
index 39053181eb9a7675c1098a4655f0f4fd98f86ed4..049b2ae7b64f9979c89e84131d46467f7d731cb0 100644 (file)
@@ -28,6 +28,9 @@
         <optional>
           <ref name='vcpu'/>
         </optional>
+        <optional>
+          <ref name='iothreads'/>
+        </optional>
         <optional>
           <ref name='os'/>
         </optional>
     </element>
   </define>
 
+  <define name='iothreads'>
+    <element name='iothreads'>
+      <ref name='supported'/>
+      <empty/>
+    </element>
+  </define>
+
   <define name='loader'>
     <element name='loader'>
       <ref name='supported'/>
index bebbaf44d00eaa5389515fd8ba38b73ff22ba602..f18bea99d63ffeec2ebb6c327171e84e414ee2d9 100644 (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);
 
index fa4c1e442f577757ef89e6a69ee1c7e36d0a0588..3b5ce214d636d29d904012f7b5a6468b23f3c826 100644 (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;
index 4109ff4db03709f53fe32326fd8cb264c806c67e..e80a2b49d63eba3a85da3b519e407140d039f302 100644 (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 ||
index 6b788d9144c8d5d9397e4f9ad7a388051a467c72..7f9582430a7a93836a0f954227170ab20fb39844 100644 (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'/>
index ab6ef9f2ef1708838403f06ac8254a993e71e43b..b97bc883262a7ba78453fcd600399f41b4a388be 100644 (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>
index d48e69948e4648062f018896cc892b49f2e1bf1f..68a942989b11570b5da56e9ffac4644a8844112e 100644 (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>
index c0e3193fe6b65faf5d5fccd5e925223dde56560a..40a0b0e12b5db53ee16da7fc9a78da3bc4206851 100644 (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>
index 8d1ad865703eaa051584b3a419793b91e5f5f949..d71d948477ef59e721ecbb1cab1e6a7a1e373453 100644 (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>
index 9cba942fbf8e596ae9c2e94005e11fc07ee5716c..9feceeea74c649ea3208fb4ba842d3cb1fa0e3f0 100644 (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>
index 4029e9e386a9587441cf2cfb9ef7871bf803af70..62f2d4f78a6e7cc6380336534c612b2c52857f2a 100644 (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>
index 50680c1ef8d2354183f31760dde95302c00be300..be505ee331a43e43f85f2f91d299ad9cd2d5b671 100644 (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>
index 851d914bc9c6fa9d8283c6cf3f40c50d3abdb0f5..84a83551ad4270e84845d67704da95525381d2a8 100644 (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>
index 7c019b2308680abf09696b07d26af6f7d7c6fbec..b3dc0dd8004b94efe18a40348772c21bae7297ea 100644 (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>
index 3b142806217bbbc958ca8f3fd8767d74f5c6740f..13bb19198d386d0c70c7b2492d47a50e714a2e0d 100644 (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>
index 98c72d36de042a0c08c060db91f9cdee5cb9d4dc..d9a243d9d573617594d33f484aa974e7e11cbdbe 100644 (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>
index de81886237ee75b36a9d36aaa3aa70c87d5a9289..7eabf6756b8904f18dc968d6f8fe0c0038f9c7b9 100644 (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>
index b93d00ece197d04af71e6aaa14a7a2c4096b5665..c2045263530f48b1b9cfe0d4c150a55eec5c3880 100644 (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>
index d860cd833fede1ccfa83064d0c0b546213fb1266..93e0a610f6ce586815419f14f24c7d1d02204950 100644 (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>
index ee40d1e84ec3270402a1063bc7ac5b7daf3efa58..6555e99c68a3e37f24d75a73e445a397376151f8 100644 (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>
index 33161f7b8234a23f2b7c0838ceb804a670dd876b..2a6edd9a0f80400028ae3793b81033f618402c50 100644 (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>
index 07e1db641a76c60cbf800c1a5a79ac06aa52d463..aef8a90f39304ca328db8cef7063d74dd248f765 100644 (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>
index 6c2bbac190c73856397795d6d1e3220793d0c3d6..e4afdeedc4e62f8339156989dca243af64d00be2 100644 (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>
index 2fc3b721389dce6834243cc5b36ef534a65c2ece..8f0f4fb7369b6e710f9eccc8a9d9e741053757a1 100644 (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>