domcaps: Add 'genid' to domain capabilities

Report domaincaps <features><genid supported='yes'/> if the guest
config accepts <genid/> or <genid>$GUID</genid>.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
John Ferlan 2018-04-27 08:16:40 -04:00
parent 87973a45f9
commit 0f358fcdca
30 changed files with 44 additions and 1 deletions

View File

@ -434,6 +434,7 @@
&lt;/enum&gt;
&lt;/gic&gt;
&lt;vmcoreinfo supported='yes'/&gt;
&lt;genid supported='yes'/&gt;
&lt;/features&gt;
&lt;/domainCapabilities&gt;
</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>

View File

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

View File

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

View File

@ -159,6 +159,7 @@ struct _virDomainCaps {
virDomainCapsFeatureGIC gic;
bool vmcoreinfo;
bool genid;
/* add new domain features here */
};

View File

@ -4943,6 +4943,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 ||

View File

@ -19,5 +19,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -29,5 +29,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -46,5 +46,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -38,5 +38,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -109,5 +109,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -72,5 +72,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -71,5 +71,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -62,5 +62,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -61,5 +61,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -110,5 +110,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -117,5 +117,6 @@
</enum>
</gic>
<vmcoreinfo supported='yes'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -79,5 +79,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -171,5 +171,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -141,5 +141,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='yes'/>
<genid supported='yes'/>
</features>
</domainCapabilities>

View File

@ -114,5 +114,6 @@
</enum>
</gic>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -110,5 +110,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -83,5 +83,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -115,5 +115,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -76,5 +76,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -116,5 +116,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -157,5 +157,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -116,5 +116,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='no'/>
</features>
</domainCapabilities>

View File

@ -124,5 +124,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='yes'/>
</features>
</domainCapabilities>

View File

@ -148,5 +148,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='yes'/>
</features>
</domainCapabilities>

View File

@ -125,5 +125,6 @@
<features>
<gic supported='no'/>
<vmcoreinfo supported='no'/>
<genid supported='yes'/>
</features>
</domainCapabilities>