From nobody Sun Feb 8 19:24:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; envelope-from=libvir-list-bounces@redhat.com; helo=mx6-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) by mx.zohomail.com with SMTPS id 1487177343197474.06136824122643; Wed, 15 Feb 2017 08:49:03 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1FGjNtI040039; Wed, 15 Feb 2017 11:45:23 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1FGjB3V025596 for ; Wed, 15 Feb 2017 11:45:11 -0500 Received: from virval.usersys.redhat.com (dhcp129-92.brq.redhat.com [10.34.129.92]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1FGjAcU010172 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 15 Feb 2017 11:45:11 -0500 Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 21059105DEA; Wed, 15 Feb 2017 17:45:08 +0100 (CET) From: Jiri Denemark To: libvir-list@redhat.com Date: Wed, 15 Feb 2017 17:44:40 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 06/33] qemu: Skip virQEMUCapsCPUFilterFeatures on non-x86 CPUs 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" All features the function is currently supposed to filter out are specific to x86_64. We should avoid removing them on other architectures. It seems to be quite unlikely other achitectures would use the same names, but one can never be sure. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_capabilities.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c5e57b4ab..0be2301cb 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3030,8 +3030,13 @@ virQEMUCapsProbeQMPGICCapabilities(virQEMUCapsPtr qe= muCaps, =20 static bool virQEMUCapsCPUFilterFeatures(const char *name, - void *opaque ATTRIBUTE_UNUSED) + void *opaque) { + virQEMUCapsPtr qemuCaps =3D opaque; + + if (!ARCH_IS_X86(qemuCaps->arch)) + return true; + if (STREQ(name, "cmt") || STREQ(name, "mbm_total") || STREQ(name, "mbm_local")) @@ -3128,7 +3133,8 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, goto error; =20 if (virCPUDefCopyModelFilter(cpu, caps->host.cpu, true, - virQEMUCapsCPUFilterFeatures, NULL) <= 0) + virQEMUCapsCPUFilterFeatures, + qemuCaps) < 0) goto error; } =20 --=20 2.11.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list