diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b751f043a4..287a2b933c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5306,10 +5306,9 @@ qemuBuildMachineCommandLine(virCommandPtr cmd, return -1; } - /* 2 is the default, so we don't put it as option for - * backwards compatibility - */ - if (def->gic_version != VIR_GIC_VERSION_2) { + /* The default GIC version should not be specified on the + * QEMU commandline for backwards compatibility reasons */ + if (def->gic_version != VIR_GIC_VERSION_DEFAULT) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACH_VIRT_GIC_VERSION)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 4ea9a71f46..c56f9f1b96 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1264,10 +1264,10 @@ qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def) break; } - /* Default to GIC v2 if no version was specified */ + /* Use the default GIC version if no version was specified */ if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON && def->gic_version == VIR_GIC_VERSION_NONE) - def->gic_version = VIR_GIC_VERSION_2; + def->gic_version = VIR_GIC_VERSION_DEFAULT; } diff --git a/src/util/virgic.h b/src/util/virgic.h index a2ba3005f9..470ce95c14 100644 --- a/src/util/virgic.h +++ b/src/util/virgic.h @@ -35,4 +35,7 @@ typedef enum { VIR_ENUM_DECL(virGICVersion); +/* Consider GIC v2 the default */ +# define VIR_GIC_VERSION_DEFAULT VIR_GIC_VERSION_2 + #endif /* __VIR_GIC_H__ */