Report domaincaps <features><genid supported='yes'/> if the guest
config accepts <genid/> or <genid>$GUID</genid>.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
docs/formatdomaincaps.html.in | 7 ++++++-
docs/schemas/domaincaps.rng | 7 +++++++
src/conf/domain_capabilities.c | 3 +++
src/conf/domain_capabilities.h | 1 +
src/qemu/qemu_capabilities.c | 2 ++
tests/domaincapsschemadata/basic.xml | 1 +
tests/domaincapsschemadata/bhyve_basic.x86_64.xml | 1 +
tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml | 1 +
tests/domaincapsschemadata/bhyve_uefi.x86_64.xml | 1 +
tests/domaincapsschemadata/full.xml | 1 +
tests/domaincapsschemadata/libxl-xenfv-usb.xml | 1 +
tests/domaincapsschemadata/libxl-xenfv.xml | 1 +
tests/domaincapsschemadata/libxl-xenpv-usb.xml | 1 +
tests/domaincapsschemadata/libxl-xenpv.xml | 1 +
tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml | 1 +
tests/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 +
tests/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 +
30 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index 86c9ce8c5c..f54581c702 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
@@ -434,6 +434,7 @@
</enum>
</gic>
<vmcoreinfo supported='yes'/>
+ <genid supported='yes'/>
</features>
</domainCapabilities>
</pre>
@@ -460,7 +461,11 @@
<h4><a id="elementsvmcoreinfo">vmcoreinfo</a></h4>
- <p>Reports whether the vmcoreinfo feature can be enabled</p>
+ <p>Reports whether the vmcoreinfo feature can be enabled.</p>
+
+ <h4><a id="elementsgenid">genid</a></h4>
+
+ <p>Reports whether the genid feature can be used by the domain.</p>
</body>
</html>
diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng
index 5913d711a3..5ceabb0a80 100644
--- a/docs/schemas/domaincaps.rng
+++ b/docs/schemas/domaincaps.rng
@@ -184,6 +184,7 @@
<interleave>
<ref name='gic'/>
<ref name='vmcoreinfo'/>
+ <ref name='vmgenid'/>
</interleave>
</element>
</define>
@@ -201,6 +202,12 @@
</element>
</define>
+ <define name='vmgenid'>
+ <element name='genid'>
+ <ref name='supported'/>
+ </element>
+ </define>
+
<define name='value'>
<zeroOrMore>
<element name='value'>
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index 6e2ab0a287..c20358e916 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -586,6 +586,9 @@ virDomainCapsFormat(virDomainCapsPtr const caps)
virBufferAsprintf(&buf, "<vmcoreinfo
supported='%s'/>\n",
caps->vmcoreinfo ? "yes" : "no");
+ virBufferAsprintf(&buf, "<genid supported='%s'/>\n",
+ caps->genid ? "yes" : "no");
+
virBufferAdjustIndent(&buf, -2);
virBufferAddLit(&buf, "</features>\n");
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
index 9b852e8649..b0eb4aa7e3 100644
--- a/src/conf/domain_capabilities.h
+++ b/src/conf/domain_capabilities.h
@@ -159,6 +159,7 @@ struct _virDomainCaps {
virDomainCapsFeatureGIC gic;
bool vmcoreinfo;
+ bool genid;
/* add new domain features here */
};
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 27ce14d4d1..9baf4b5b6a 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4886,6 +4886,8 @@ virQEMUCapsFillDomainCaps(virCapsPtr caps,
domCaps->vmcoreinfo = virQEMUCapsGet(qemuCaps,
QEMU_CAPS_DEVICE_VMCOREINFO);
+ domCaps->genid = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VMGENID);
+
if (virQEMUCapsFillDomainOSCaps(os, firmwares, nfirmwares) < 0 ||
virQEMUCapsFillDomainCPUCaps(caps, qemuCaps, domCaps) < 0 ||
virQEMUCapsFillDomainIOThreadCaps(qemuCaps, domCaps) < 0 ||
diff --git a/tests/domaincapsschemadata/basic.xml b/tests/domaincapsschemadata/basic.xml
index 09e9376585..acc4a4d7d7 100644
--- a/tests/domaincapsschemadata/basic.xml
+++ b/tests/domaincapsschemadata/basic.xml
@@ -19,5 +19,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/bhyve_basic.x86_64.xml
b/tests/domaincapsschemadata/bhyve_basic.x86_64.xml
index 055d05b568..c4e8477055 100644
--- a/tests/domaincapsschemadata/bhyve_basic.x86_64.xml
+++ b/tests/domaincapsschemadata/bhyve_basic.x86_64.xml
@@ -29,5 +29,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml
b/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml
index b22ca43ba0..0ba46b2c5e 100644
--- a/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml
+++ b/tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml
@@ -46,5 +46,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml
b/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml
index 625a55e70c..80318c78d8 100644
--- a/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml
+++ b/tests/domaincapsschemadata/bhyve_uefi.x86_64.xml
@@ -38,5 +38,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/full.xml b/tests/domaincapsschemadata/full.xml
index 47017c6fd1..9866886303 100644
--- a/tests/domaincapsschemadata/full.xml
+++ b/tests/domaincapsschemadata/full.xml
@@ -109,5 +109,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/libxl-xenfv-usb.xml
b/tests/domaincapsschemadata/libxl-xenfv-usb.xml
index 3f245e8961..6b56419ee1 100644
--- a/tests/domaincapsschemadata/libxl-xenfv-usb.xml
+++ b/tests/domaincapsschemadata/libxl-xenfv-usb.xml
@@ -72,5 +72,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/libxl-xenfv.xml
b/tests/domaincapsschemadata/libxl-xenfv.xml
index a81ce3310c..65dbc5aaf4 100644
--- a/tests/domaincapsschemadata/libxl-xenfv.xml
+++ b/tests/domaincapsschemadata/libxl-xenfv.xml
@@ -71,5 +71,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/libxl-xenpv-usb.xml
b/tests/domaincapsschemadata/libxl-xenpv-usb.xml
index 2bcd588c0f..92e54bae07 100644
--- a/tests/domaincapsschemadata/libxl-xenpv-usb.xml
+++ b/tests/domaincapsschemadata/libxl-xenpv-usb.xml
@@ -62,5 +62,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/libxl-xenpv.xml
b/tests/domaincapsschemadata/libxl-xenpv.xml
index e856ed00c6..741fd2d9d6 100644
--- a/tests/domaincapsschemadata/libxl-xenpv.xml
+++ b/tests/domaincapsschemadata/libxl-xenpv.xml
@@ -61,5 +61,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
index 88c087549d..236d0de8f1 100644
--- a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
+++ b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
@@ -110,5 +110,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml
b/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml
index 69d9968064..4d7056162e 100644
--- a/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml
+++ b/tests/domaincapsschemadata/qemu_2.12.0-virt.aarch64.xml
@@ -117,5 +117,6 @@
</enum>
</gic>
<vmcoreinfo supported='yes'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml
b/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml
index 5fac2ed772..8d7fd64f65 100644
--- a/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml
+++ b/tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml
@@ -79,5 +79,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml
b/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml
index 4bacb879fe..7dca0b132d 100644
--- a/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml
+++ b/tests/domaincapsschemadata/qemu_2.12.0.s390x.xml
@@ -76,5 +76,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml
b/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml
index d0e2866c49..a8e3174dd6 100644
--- a/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml
+++ b/tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml
@@ -141,5 +141,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='yes'/>
+ <genid supported='yes'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml
b/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml
index a4290ddc22..709a14d7fe 100644
--- a/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml
+++ b/tests/domaincapsschemadata/qemu_2.6.0-virt.aarch64.xml
@@ -114,5 +114,6 @@
</enum>
</gic>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
index 943d978682..a4789a532c 100644
--- a/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
+++ b/tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml
@@ -110,5 +110,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml
b/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml
index 86985a5856..79f4a06769 100644
--- a/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml
+++ b/tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml
@@ -83,5 +83,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml
b/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml
index 04be214659..55edf1b221 100644
--- a/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml
+++ b/tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml
@@ -115,5 +115,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml
b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml
index 6b2d81520e..d18e05e53c 100644
--- a/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml
+++ b/tests/domaincapsschemadata/qemu_2.7.0.s390x.xml
@@ -76,5 +76,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
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 eadcc3c8e4..825f1f97f8 100644
--- a/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml
+++ b/tests/domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml
@@ -116,5 +116,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml
b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml
index 0a71be4244..d524bb8970 100644
--- a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml
+++ b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml
@@ -157,5 +157,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml
b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml
index 243d84fd0d..a0d9e11522 100644
--- a/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml
+++ b/tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml
@@ -116,5 +116,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='no'/>
</features>
</domainCapabilities>
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 d7cb1dc5ee..254ee01049 100644
--- a/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml
+++ b/tests/domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml
@@ -124,5 +124,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='yes'/>
</features>
</domainCapabilities>
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 09457e4be6..478133693f 100644
--- a/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml
+++ b/tests/domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml
@@ -148,5 +148,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='yes'/>
</features>
</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml
b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml
index f8337d8dd4..058e624ed3 100644
--- a/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml
+++ b/tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml
@@ -125,5 +125,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
+ <genid supported='yes'/>
</features>
</domainCapabilities>
--
2.14.3