From nobody Thu Dec 18 12:32:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; envelope-from=libvir-list-bounces@redhat.com; helo=mx3-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mx.zohomail.com with SMTPS id 1487153961271235.334093895386; Wed, 15 Feb 2017 02:19:21 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1FAGAj0001724; Wed, 15 Feb 2017 05:16:12 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1FAFWlN003125 for ; Wed, 15 Feb 2017 05:15:32 -0500 Received: from virval.usersys.redhat.com (dhcp129-92.brq.redhat.com [10.34.129.92]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1FAFVda008383 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 15 Feb 2017 05:15:32 -0500 Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 683D71020CE; Wed, 15 Feb 2017 11:15:29 +0100 (CET) From: Jiri Denemark To: libvir-list@redhat.com Date: Wed, 15 Feb 2017 11:15:00 +0100 Message-Id: <67f82cfbc2de0d5bc94c59a266559988919fdcc9.1487152754.git.jdenemar@redhat.com> 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.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 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 --- 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