From nobody Mon Feb 9 09:10:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1494598506704493.9533573115832; Fri, 12 May 2017 07:15:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA1FB19CBD1; Fri, 12 May 2017 14:15:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96BEA8B329; Fri, 12 May 2017 14:15:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AC3D01800C96; Fri, 12 May 2017 14:15:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4CEEwSk019999 for ; Fri, 12 May 2017 10:14:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1CA548EE41; Fri, 12 May 2017 14:14:58 +0000 (UTC) Received: from inaba.usersys.redhat.com (dhcp129-60.brq.redhat.com [10.34.129.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A0317EA5B for ; Fri, 12 May 2017 14:14:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CA1FB19CBD1 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CA1FB19CBD1 From: Andrea Bolognani To: libvir-list@redhat.com Date: Fri, 12 May 2017 16:14:46 +0200 Message-Id: <1494598487-6529-5-git-send-email-abologna@redhat.com> In-Reply-To: <1494598487-6529-1-git-send-email-abologna@redhat.com> References: <1494598487-6529-1-git-send-email-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/5] gic: Remove VIR_GIC_VERSION_DEFAULT X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 12 May 2017 14:15:04 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 --- 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 813a851..c2a9415 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7374,9 +7374,9 @@ qemuBuildMachineCommandLine(virCommandPtr cmd, goto cleanup; } =20 - /* The default GIC version should not be specified on the - * QEMU commandline for backwards compatibility reasons */ - if (def->gic_version !=3D VIR_GIC_VERSION_DEFAULT) { + /* The default GIC version (GICv2) should not be specified= on + * the QEMU commandline for backwards compatibility reason= s */ + if (def->gic_version !=3D 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 31ed391..2dae837 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2592,12 +2592,11 @@ qemuDomainDefEnableDefaultFeatures(virDomainDefPtr = def, def->features[VIR_DOMAIN_FEATURE_GIC] =3D VIR_TRISTATE_SWITCH_ON; } =20 - /* 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] =3D=3D VIR_TRISTATE_SWITCH_O= N && def->gic_version =3D=3D VIR_GIC_VERSION_NONE) { - VIR_DEBUG("Using GIC version %s (default)", - virGICVersionTypeToString(VIR_GIC_VERSION_DEFAULT)); - def->gic_version =3D VIR_GIC_VERSION_DEFAULT; + VIR_DEBUG("Using GIC version 2 (default)"); + def->gic_version =3D VIR_GIC_VERSION_2; } } =20 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 { =20 VIR_ENUM_DECL(virGICVersion); =20 -/* Consider GIC v2 the default */ -# define VIR_GIC_VERSION_DEFAULT VIR_GIC_VERSION_2 - typedef enum { VIR_GIC_IMPLEMENTATION_NONE =3D 0, VIR_GIC_IMPLEMENTATION_KERNEL =3D (1 << 1), --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list