[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1.5/6] qemu: advertise ioapic tuning in the capabilities



Add an <ioapic/> element to <guest><features>.

https://bugzilla.redhat.com/show_bug.cgi?id=1427005
---
 docs/formatcaps.html.in                           | 3 +++
 src/conf/capabilities.c                           | 3 ++-
 src/qemu/qemu_capabilities.c                      | 3 ++-
 tests/qemucaps2xmldata/all_1.6.0-1.xml            | 1 +
 tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml | 1 +
 5 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/docs/formatcaps.html.in b/docs/formatcaps.html.in
index bc4511c..5b8ee5f 100644
--- a/docs/formatcaps.html.in
+++ b/docs/formatcaps.html.in
@@ -134,6 +134,9 @@
               requires attempting the API and checking for an error to
               find out for sure. <span class="since">Since
               1.2.3</span></dd>
+            <dt><code>apic</code></dt><dd>If this element is present,
+              the I/O APIC chip can be tuned.
+              <span class="since">Since 3.4.0</span></dd>
           </dl>
         </dd>
     </dl>
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index c36ca40..022d598 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -1100,7 +1100,8 @@ virCapabilitiesFormatXML(virCapsPtr caps)
                     STREQ(caps->guests[i]->features[j]->name, "nonpae") ||
                     STREQ(caps->guests[i]->features[j]->name, "ia64_be") ||
                     STREQ(caps->guests[i]->features[j]->name, "cpuselection") ||
-                    STREQ(caps->guests[i]->features[j]->name, "deviceboot")) {
+                    STREQ(caps->guests[i]->features[j]->name, "deviceboot") ||
+                    STREQ(caps->guests[i]->features[j]->name, "ioapic")) {
                     virBufferAsprintf(&buf, "<%s/>\n",
                                       caps->guests[i]->features[j]->name);
                 } else {
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 71951e6..bbfa56c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1065,7 +1065,8 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
     }
 
     if (ARCH_IS_X86(guestarch) &&
-        virCapabilitiesAddGuestFeature(guest, "apic", true, false) == NULL) {
+        (virCapabilitiesAddGuestFeature(guest, "apic", true, false) == NULL ||
+         virCapabilitiesAddGuestFeature(guest, "ioapic", true, false) == NULL)) {
         goto cleanup;
     }
 
diff --git a/tests/qemucaps2xmldata/all_1.6.0-1.xml b/tests/qemucaps2xmldata/all_1.6.0-1.xml
index 84d6000..dd93a98 100644
--- a/tests/qemucaps2xmldata/all_1.6.0-1.xml
+++ b/tests/qemucaps2xmldata/all_1.6.0-1.xml
@@ -23,6 +23,7 @@
       <disksnapshot default='on' toggle='no'/>
       <acpi default='on' toggle='yes'/>
       <apic default='on' toggle='no'/>
+      <ioapic/>
       <pae/>
       <nonpae/>
     </features>
diff --git a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml b/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml
index 28762c2..5add116 100644
--- a/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml
+++ b/tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml
@@ -23,6 +23,7 @@
       <disksnapshot default='off' toggle='no'/>
       <acpi default='on' toggle='yes'/>
       <apic default='on' toggle='no'/>
+      <ioapic/>
       <pae/>
       <nonpae/>
     </features>
-- 
2.10.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]