On 06/01/2018 10:15 AM, Filip Alac wrote:
Signed-off-by: Filip Alac <filipalac(a)gmail.com>
---
docs/schemas/capability.rng | 13 +++++++++++++
src/conf/capabilities.c | 9 +++++++++
src/conf/capabilities.h | 3 +++
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 3 +++
src/test/test_driver.c | 2 ++
tests/qemucaps2xmldata/all_1.6.0-1.xml | 1 +
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml | 1 +
tests/vircaps2xmldata/vircaps-aarch64-basic.xml | 1 +
tests/vircaps2xmldata/vircaps-x86_64-basic.xml | 1 +
tests/vircaps2xmldata/vircaps-x86_64-caches.xml | 1 +
.../vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml | 1 +
.../vircaps-x86_64-resctrl-skx-twocaches.xml | 1 +
.../vircaps2xmldata/vircaps-x86_64-resctrl-skx.xml | 1 +
tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml | 1 +
15 files changed, 40 insertions(+)
diff --git a/docs/schemas/capability.rng b/docs/schemas/capability.rng
index 66c5de62e5..52164d5ecb 100644
--- a/docs/schemas/capability.rng
+++ b/docs/schemas/capability.rng
@@ -39,6 +39,9 @@
<optional>
<ref name='power_management'/>
</optional>
+ <optional>
+ <ref name='iommu_support'/>
+ </optional>
<optional>
<ref name='migration'/>
</optional>
@@ -155,6 +158,16 @@
</element>
</define>
+ <define name='iommu_support'>
+ <element name='iommu'>
+ <optional>
+ <attribute name='support'>
+ <ref name='virYesNo'/>
+ </attribute>
+ </optional>
+ </element>
+ </define>
+
<define name='migration'>
<element name='migration_features'>
<optional>
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index dd2fc77f91..0de1440349 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -1025,6 +1025,9 @@ virCapabilitiesFormatXML(virCapsPtr caps)
virBufferAddLit(&buf, "<power_management/>\n");
}
+ virBufferAsprintf(&buf, "<iommu support='%s'/>\n",
+ caps->host.iommu ? "yes" : "no");
+
if (caps->host.offlineMigrate) {
virBufferAddLit(&buf, "<migration_features>\n");
virBufferAdjustIndent(&buf, 2);
@@ -1743,3 +1746,9 @@ virCapabilitiesInitCaches(virCapsPtr caps)
virBitmapFree(cpus);
return ret;
}
+
+void
+virCapabilitiesHostInitIOMMU(virCapsPtr caps)
Again, two empty lines between functions.
Michal