From nobody Fri May 16 16:15:50 2025 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 1494860927030455.16545045462067; Mon, 15 May 2017 08:08:47 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ABB96C04B924; Mon, 15 May 2017 15:08:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B12D7ED8F; Mon, 15 May 2017 15:08:41 +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 B29AD4ED61; Mon, 15 May 2017 15:08:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4FF7xqo003566 for ; Mon, 15 May 2017 11:07:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id EF1CB18225; Mon, 15 May 2017 15:07:59 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-221.brq.redhat.com [10.40.204.221]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44402D0211 for ; Mon, 15 May 2017 15:07:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ABB96C04B924 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 ABB96C04B924 From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 15 May 2017 17:06:51 +0200 Message-Id: <1494860812-24684-5-git-send-email-abologna@redhat.com> In-Reply-To: <1494860812-24684-1-git-send-email-abologna@redhat.com> References: <1494860812-24684-1-git-send-email-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 15 May 2017 15:08:44 +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 079a134..fdffe17 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2596,12 +2596,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