262bbf08f2
Don't run libvirtd in live environment, to avoid network collision (bz #1146232)
68 lines
2.7 KiB
Diff
68 lines
2.7 KiB
Diff
From: Andrea Bolognani <abologna@redhat.com>
|
|
Date: Fri, 12 May 2017 14:38:08 +0200
|
|
Subject: [PATCH] gic: Remove VIR_GIC_VERSION_DEFAULT
|
|
|
|
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>
|
|
(cherry picked from commit 5645badd1fe04fee7237c2f95e7710e978e40770)
|
|
---
|
|
src/qemu/qemu_command.c | 6 +++---
|
|
src/qemu/qemu_domain.c | 7 +++----
|
|
src/util/virgic.h | 3 ---
|
|
3 files changed, 6 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
|
index 64d2d71..188e273 100644
|
|
--- a/src/qemu/qemu_command.c
|
|
+++ b/src/qemu/qemu_command.c
|
|
@@ -7317,9 +7317,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",
|
|
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
|
index 891f825..4a127ce 100644
|
|
--- a/src/qemu/qemu_domain.c
|
|
+++ b/src/qemu/qemu_domain.c
|
|
@@ -2560,12 +2560,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;
|
|
}
|
|
}
|
|
|
|
diff --git a/src/util/virgic.h b/src/util/virgic.h
|
|
index 1c9efd6..2d77fdd 100644
|
|
--- a/src/util/virgic.h
|
|
+++ b/src/util/virgic.h
|
|
@@ -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),
|