<hidden state='on'/>
</kvm>
<pvspinlock/>
+ <gic version='2'/>
</features>
...</pre>
the emulation of VMWare IO port, for vmmouse etc.
<span class="since">Since 1.2.16</span>
</dd>
+ <dt><code>gic</code></dt>
+ <dd>Enable for architectures using a General Interrupt
+ Controller instead of APIC in order to handle interrupts.
+ For example, the 'aarch64' architecture uses
+ <code>gic</code> instead of <code>apic</code>. The optional
+ attribute <code>version</code> specifies the GIC version;
+ however, it may not be supported by all hypervisors. <span
+ class="since">Since 1.2.16</span>
+ </dd>
</dl>
<h3><a name="elementsTime">Time keeping</a></h3>
</element>
</define>
<!--
- A set of optional features: PAE, APIC, ACPI,
+ A set of optional features: PAE, APIC, ACPI, GIC,
HyperV Enlightenment, KVM features, paravirtual spinlocks and HAP support
-->
<define name="features">
</optional>
</element>
</optional>
+ <optional>
+ <element name="gic">
+ <optional>
+ <attribute name="version">
+ <ref name="positiveInteger"/>
+ </attribute>
+ </optional>
+ </element>
+ </optional>
</interleave>
</element>
</optional>
"pvspinlock",
"capabilities",
"pmu",
- "vmport")
+ "vmport",
+ "gic")
VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST,
"default",
ctxt->node = node;
break;
+ case VIR_DOMAIN_FEATURE_GIC:
+ node = ctxt->node;
+ ctxt->node = nodes[i];
+ if ((tmp = virXPathString("string(./@version)", ctxt))) {
+ if (virStrToLong_uip(tmp, NULL, 10, &def->gic_version) < 0 ||
+ def->gic_version == 0) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("malformed gic version: %s"), tmp);
+ goto error;
+ }
+ VIR_FREE(tmp);
+ }
+ def->features[val] = VIR_TRISTATE_SWITCH_ON;
+ ctxt->node = node;
+ break;
+
/* coverity[dead_error_begin] */
case VIR_DOMAIN_FEATURE_LAST:
break;
return false;
}
+ /* GIC version */
+ if (src->gic_version != dst->gic_version) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Source GIC version '%u' does not match destination '%u'"),
+ src->gic_version, dst->gic_version);
+ return false;
+ }
+
/* hyperv */
if (src->features[VIR_DOMAIN_FEATURE_HYPERV] == VIR_TRISTATE_SWITCH_ON) {
for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) {
virBufferAddLit(buf, "</capabilities>\n");
break;
+ case VIR_DOMAIN_FEATURE_GIC:
+ if (def->features[i] == VIR_TRISTATE_SWITCH_ON) {
+ virBufferAddLit(buf, "<gic");
+ if (def->gic_version)
+ virBufferAsprintf(buf, " version='%u'",
+ def->gic_version);
+ virBufferAddLit(buf, "/>\n");
+ }
+ break;
+
/* coverity[dead_error_begin] */
case VIR_DOMAIN_FEATURE_LAST:
break;
VIR_DOMAIN_FEATURE_CAPABILITIES,
VIR_DOMAIN_FEATURE_PMU,
VIR_DOMAIN_FEATURE_VMPORT,
+ VIR_DOMAIN_FEATURE_GIC,
VIR_DOMAIN_FEATURE_LAST
} virDomainFeature;
int hyperv_features[VIR_DOMAIN_HYPERV_LAST];
int kvm_features[VIR_DOMAIN_KVM_LAST];
unsigned int hyperv_spinlocks;
+ unsigned int gic_version;
/* These options are of type virTristateSwitch: ON = keep, OFF = drop */
int caps_features[VIR_DOMAIN_CAPS_FEATURE_LAST];