]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
gic: Remove VIR_GIC_VERSION_DEFAULT
authorAndrea Bolognani <abologna@redhat.com>
Fri, 12 May 2017 12:38:08 +0000 (14:38 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 16 May 2017 14:48:30 +0000 (16:48 +0200)
The QEMU default is GICv2, and some of the code in libvirt
relies on the exact value. Stop pretending that's not the
case and use GICv2 explicitly where needed.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/util/virgic.h

index d8d0dea94bad11690c0643b05f92debe68618a1a..4c1a266d259e89c12178331b312e8af0a85bf781 100644 (file)
@@ -7403,9 +7403,9 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
                     goto cleanup;
                 }
 
-                /* The default GIC version should not be specified on the
-                 * QEMU commandline for backwards compatibility reasons */
-                if (def->gic_version != VIR_GIC_VERSION_DEFAULT) {
+                /* The default GIC version (GICv2) should not be specified on
+                 * the QEMU commandline for backwards compatibility reasons */
+                if (def->gic_version != VIR_GIC_VERSION_2) {
                     if (!virQEMUCapsGet(qemuCaps,
                                         QEMU_CAPS_MACH_VIRT_GIC_VERSION)) {
                         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
index 98f5adb9090b547c1fc3ce7966c250d10de2f396..7c54f69f5426e4a34fda74a3ff2b81ac84b51ba8 100644 (file)
@@ -2596,12 +2596,11 @@ qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def,
         def->features[VIR_DOMAIN_FEATURE_GIC] = VIR_TRISTATE_SWITCH_ON;
     }
 
-    /* Use the default GIC version if no version was specified */
+    /* Use the default GIC version (GICv2) if no version was specified */
     if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON &&
         def->gic_version == VIR_GIC_VERSION_NONE) {
-        VIR_DEBUG("Using GIC version %s (default)",
-                  virGICVersionTypeToString(VIR_GIC_VERSION_DEFAULT));
-        def->gic_version = VIR_GIC_VERSION_DEFAULT;
+        VIR_DEBUG("Using GIC version 2 (default)");
+        def->gic_version = VIR_GIC_VERSION_2;
     }
 }
 
index 1c9efd60f90bd40ee6c713735a8b24ab01c8f6cd..2d77fdd4599e87914765d81c23f772f7cb0e3268 100644 (file)
@@ -35,9 +35,6 @@ typedef enum {
 
 VIR_ENUM_DECL(virGICVersion);
 
-/* Consider GIC v2 the default */
-# define VIR_GIC_VERSION_DEFAULT VIR_GIC_VERSION_2
-
 typedef enum {
     VIR_GIC_IMPLEMENTATION_NONE = 0,
     VIR_GIC_IMPLEMENTATION_KERNEL = (1 << 1),