From nobody Mon Feb 9 10:32:50 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 1494860920331554.6002472116123; Mon, 15 May 2017 08:08:40 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 104AC7E9F5; Mon, 15 May 2017 15:08:37 +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 B9F2E7755B; Mon, 15 May 2017 15:08:36 +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 E96745FBC6; Mon, 15 May 2017 15:08:25 +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 v4FF7wpC003559 for ; Mon, 15 May 2017 11:07:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id ABC491825A; Mon, 15 May 2017 15:07:58 +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 D9BA618791 for ; Mon, 15 May 2017 15:07:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 104AC7E9F5 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.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 104AC7E9F5 From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 15 May 2017 17:06:50 +0200 Message-Id: <1494860812-24684-4-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 3/5] qemu: Use GICv2 for aarch64/virt TCG guests 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 15 May 2017 15:08:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" There are currently some limitations in the emulated GICv3 that make it unsuitable as a default. Use GICv2 instead. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1450433 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 23 ++++++++++++++++++= +++- .../qemuxml2argv-aarch64-gic-none-tcg.args | 2 +- .../qemuxml2xmlout-aarch64-gic-none-tcg.xml | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index cc02c80..079a134 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2563,6 +2563,24 @@ qemuDomainDefEnableDefaultFeatures(virDomainDefPtr d= ef, for (version =3D VIR_GIC_VERSION_LAST - 1; version > VIR_GIC_VERSION_NONE; version--) { + + /* We want to use the highest available GIC version for guests; + * however, the emulated GICv3 is currently lacking a MSI cont= roller, + * making it unsuitable for the pure PCIe topology we aim for. + * + * For that reason, we skip this step entirely for TCG guests, + * and rely on the code below to pick the default version, GIC= v2, + * which supports all the features we need. + * + * We'll want to revisit this once MSI support for GICv3 has b= een + * implemented in QEMU. + * + * See https://bugzilla.redhat.com/show_bug.cgi?id=3D1414081 */ + if (version =3D=3D VIR_GIC_VERSION_3 && + def->virtType =3D=3D VIR_DOMAIN_VIRT_QEMU) { + continue; + } + if (virQEMUCapsSupportsGICVersion(qemuCaps, def->virtType, version)) { @@ -2580,8 +2598,11 @@ qemuDomainDefEnableDefaultFeatures(virDomainDefPtr d= ef, =20 /* Use the default GIC version 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) + 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; + } } =20 =20 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.args = b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.args index 975a014..52b6996 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.args @@ -7,7 +7,7 @@ QEMU_AUDIO_DRV=3Dnone \ /usr/bin/qemu-system-aarch64 \ -name guest \ -S \ --machine virt,accel=3Dtcg,gic-version=3D3 \ +-machine virt,accel=3Dtcg \ -cpu cortex-a57 \ -m 1024 \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-tcg.x= ml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-tcg.xml index 69510e2..a0cd0b7 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-tcg.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-tcg.xml @@ -9,7 +9,7 @@ - + cortex-a57 --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list