提交 bd236950 编写于 作者: A Andrea Bolognani

qemu: Always enable GIC on ARM virt machines

GIC is always available to ARM virt machines, and the domain XML should
reflect this fact.
上级 5b2c2a10
...@@ -1249,6 +1249,20 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def, ...@@ -1249,6 +1249,20 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
static void static void
qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def) qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def)
{ {
switch (def->os.arch) {
case VIR_ARCH_ARMV7L:
case VIR_ARCH_AARCH64:
if (STREQ(def->os.machine, "virt") ||
STRPREFIX(def->os.machine, "virt-")) {
/* GIC is always available to ARM virt machines */
def->features[VIR_DOMAIN_FEATURE_GIC] = VIR_TRISTATE_SWITCH_ON;
}
break;
default:
break;
}
/* Default to GIC v2 if no version was specified */ /* Default to GIC v2 if no version was specified */
if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON && if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON &&
def->gic_version == VIR_GIC_VERSION_NONE) def->gic_version == VIR_GIC_VERSION_NONE)
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<acpi/> <acpi/>
<apic/> <apic/>
<pae/> <pae/>
<gic version='2'/>
</features> </features>
<cpu mode='custom' match='exact'> <cpu mode='custom' match='exact'>
<model fallback='allow'>cortex-a53</model> <model fallback='allow'>cortex-a53</model>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<acpi/> <acpi/>
<apic/> <apic/>
<pae/> <pae/>
<gic version='2'/>
</features> </features>
<cpu mode='custom' match='exact'> <cpu mode='custom' match='exact'>
<model fallback='allow'>cortex-a53</model> <model fallback='allow'>cortex-a53</model>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<acpi/> <acpi/>
<apic/> <apic/>
<pae/> <pae/>
<gic version='2'/>
</features> </features>
<cpu mode='custom' match='exact'> <cpu mode='custom' match='exact'>
<model fallback='allow'>cortex-a53</model> <model fallback='allow'>cortex-a53</model>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<acpi/> <acpi/>
<apic/> <apic/>
<pae/> <pae/>
<gic version='2'/>
</features> </features>
<cpu mode='custom' match='exact'> <cpu mode='custom' match='exact'>
<model fallback='allow'>cortex-a53</model> <model fallback='allow'>cortex-a53</model>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册