domain_capabilities: Report <vmcoreinfo> support

Report <features><vmcoreinfo supported='yes'/> if the guest config
accepts <features><vmcoreinfo state='on'/>

Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2018-04-17 13:54:28 -04:00
parent 217d2656a5
commit 33455bc4ce
30 changed files with 43 additions and 0 deletions

View File

@ -433,6 +433,7 @@
&lt;value&gt;3&lt;/value&gt;
&lt;/enum&gt;
&lt;/gic&gt;
&lt;vmcoreinfo supported='yes'/&gt;
&lt;/features&gt;
&lt;/domainCapabilities&gt;
</pre>
@ -457,5 +458,9 @@
<code>gic</code> element.</dd>
</dl>
<h4><a id="elementsvmcoreinfo">vmcoreinfo</a></h4>
<p>Reports whether the vmcoreinfo feature can be enabled</p>
</body>
</html>

View File

@ -183,6 +183,7 @@
<element name='features'>
<interleave>
<ref name='gic'/>
<ref name='vmcoreinfo'/>
</interleave>
</element>
</define>
@ -194,6 +195,12 @@
</element>
</define>
<define name='vmcoreinfo'>
<element name='vmcoreinfo'>
<ref name='supported'/>
</element>
</define>
<define name='value'>
<zeroOrMore>
<element name='value'>

View File

@ -583,6 +583,8 @@ virDomainCapsFormat(virDomainCapsPtr const caps)
virBufferAdjustIndent(&buf, 2);
virDomainCapsFeatureGICFormat(&buf, &caps->gic);
virBufferAsprintf(&buf, "<vmcoreinfo supported='%s'/>\n",
caps->vmcoreinfo ? "yes" : "no");
virBufferAdjustIndent(&buf, -2);
virBufferAddLit(&buf, "</features>\n");

View File

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

View File

@ -4881,6 +4881,9 @@ virQEMUCapsFillDomainCaps(virCapsPtr caps,
domCaps->maxvcpus = MIN(domCaps->maxvcpus, hostmaxvcpus);
}
domCaps->vmcoreinfo = virQEMUCapsGet(qemuCaps,
QEMU_CAPS_DEVICE_VMCOREINFO);
if (virQEMUCapsFillDomainOSCaps(os, firmwares, nfirmwares) < 0 ||
virQEMUCapsFillDomainCPUCaps(caps, qemuCaps, domCaps) < 0 ||
virQEMUCapsFillDomainIOThreadCaps(qemuCaps, domCaps) < 0 ||

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -116,5 +116,6 @@
<value>3</value>
</enum>
</gic>
<vmcoreinfo supported='yes'/>
</features>
</domainCapabilities>

View File

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

View File

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

View File

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

View File

@ -113,5 +113,6 @@
<value>2</value>
</enum>
</gic>
<vmcoreinfo supported='no'/>
</features>
</domainCapabilities>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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