]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Always enable GIC on ARM virt machines
authorAndrea Bolognani <abologna@redhat.com>
Wed, 3 Feb 2016 18:49:27 +0000 (19:49 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 16 Feb 2016 13:58:58 +0000 (14:58 +0100)
GIC is always available to ARM virt machines, and the domain XML should
reflect this fact.

src/qemu/qemu_domain.c
tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-aavmf-virtio-mmio.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-manual-addresses.xml

index 7fbd5ef1430d21edb8f281c0198f68e4cf0224d2..42197739649a6368412fb5dd75577d6d57fbff1f 100644 (file)
@@ -1249,6 +1249,20 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
 static void
 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 */
     if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON &&
         def->gic_version == VIR_GIC_VERSION_NONE)
index 4a31c8b1cc9e6db9d1adb8a2cd843fa6d45743ba..8c7428cf82e6dba9b799057b1f8c9db056cf43d1 100644 (file)
@@ -16,6 +16,7 @@
     <acpi/>
     <apic/>
     <pae/>
+    <gic version='2'/>
   </features>
   <cpu mode='custom' match='exact'>
     <model fallback='allow'>cortex-a53</model>
index f79c6e72a15ddd665b3101f819dcd850e99e401f..2f1f8dd3de01a962ce1fd125aaf1032320d422f5 100644 (file)
@@ -16,6 +16,7 @@
     <acpi/>
     <apic/>
     <pae/>
+    <gic version='2'/>
   </features>
   <cpu mode='custom' match='exact'>
     <model fallback='allow'>cortex-a53</model>
index 6f1c53b26d420d3a32c4a10e72f459818897a3b7..415d041a39fc66c72feb3a807d3b8f5f51242af7 100644 (file)
@@ -16,6 +16,7 @@
     <acpi/>
     <apic/>
     <pae/>
+    <gic version='2'/>
   </features>
   <cpu mode='custom' match='exact'>
     <model fallback='allow'>cortex-a53</model>
index 4add271a831e27e26ad1f8c8060001459fda3dc9..0ee40f5eaad47eb23e507305ab1a9fda1a08107f 100644 (file)
@@ -16,6 +16,7 @@
     <acpi/>
     <apic/>
     <pae/>
+    <gic version='2'/>
   </features>
   <cpu mode='custom' match='exact'>
     <model fallback='allow'>cortex-a53</model>