<dd>The guest will not be created unless the host CPU does exactly
match the specification.</dd>
</dl>
+
+ <span class="since">Since 0.8.5</span> the <code>match</code>
+ attribute can be omitted and will default to <code>exact</code>.
</dd>
<dt><code>model</code></dt>
<dd>Guest creation will fail if the feature is supported by host
CPU.</dd>
</dl>
+
+ <span class="since">Since 0.8.5</span> the <code>policy</code>
+ attribute can be omitted and will default to <code>require</code>.
</dd>
</dl>
char *match = virXMLPropString(node, "match");
if (!match) {
- if (virXPathBoolean("boolean(./model)", ctxt)) {
- virCPUReportError(VIR_ERR_INTERNAL_ERROR,
- "%s", _("Missing match attribute for CPU specification"));
- goto error;
- }
- def->match = -1;
+ if (virXPathBoolean("boolean(./model)", ctxt))
+ def->match = VIR_CPU_MATCH_EXACT;
+ else
+ def->match = -1;
} else {
def->match = virCPUMatchTypeFromString(match);
VIR_FREE(match);
char *strpolicy;
strpolicy = virXMLPropString(nodes[i], "policy");
- policy = virCPUFeaturePolicyTypeFromString(strpolicy);
+ if (strpolicy == NULL)
+ policy = VIR_CPU_FEATURE_REQUIRE;
+ else
+ policy = virCPUFeaturePolicyTypeFromString(strpolicy);
VIR_FREE(strpolicy);
if (policy < 0) {