From nobody Sun Feb 8 18:23:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572960552; cv=none; d=zoho.com; s=zohoarc; b=opJyx4+MVKZpojQ3ceI0lQAV8kLva0qmoTBaQ6i8rcyT3utN7cgRSpa27LuVvYdUaBidmVzMhU7yCjQ3Azjn3chqBqj9I6sJxCtLCRHBPyRfNxW259/RpTLh1HRuvA7wGWKyetYKYdT+JsOKSsR1syRxule24pLbmXKWrNUhcz8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572960552; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sSfjL9k5Aur1swlagmg7FG9Sej9Kc1uPxCY1zGjRfKQ=; b=UnH+DVPBRcVKAvbIYyDlhaeVhsWs1JNvNtd4zW3D0hlLoeVJBwvV8IfiaT98Ar9+wbcqGi5HpuPhIDEVzVsokRXYRG4VavZ8/1Xk4HJmW+PJ42wz2JKDRbCQU9/QG5KVpTC40AyxT4lMDC9Gp8+FbP98j6h5eAmnA5kSez1Qg18= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1572960552353980.1358465453807; Tue, 5 Nov 2019 05:29:12 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-109-NlPgNip7PomaK7bdCXoInw-1; Tue, 05 Nov 2019 08:28:49 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 43DC2107ACFC; Tue, 5 Nov 2019 13:28:44 +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 20FBC5C554; Tue, 5 Nov 2019 13:28:44 +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 D5DB74E570; Tue, 5 Nov 2019 13:28:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA5DS0Em003969 for ; Tue, 5 Nov 2019 08:28:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5B3071001DC2; Tue, 5 Nov 2019 13:28:00 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2DFBB1001B00 for ; Tue, 5 Nov 2019 13:27:57 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 76FAF105B24; Tue, 5 Nov 2019 14:27:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572960551; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=sSfjL9k5Aur1swlagmg7FG9Sej9Kc1uPxCY1zGjRfKQ=; b=WWE5zOvQkL/OJb3SNr07Peddi75CCcZfXjTCyI8dEqAwQSh4osS5WqcNMvcYUF5XNuT+WM jMkP/yiKBMRHC/vzqA8xGepFIPW2ogz4lXW//G6zNkQRR3v4pbsG84SpCaRk3wLMKXhtrv jatu3y0UKNlqphB0p0TqwM+tRFN9Ckk= From: Jiri Denemark To: libvir-list@redhat.com Date: Tue, 5 Nov 2019 14:27:05 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 07/52] qemu: Use virQEMUCapsGetCPUDefinitions more 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: , 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-MC-Unique: NlPgNip7PomaK7bdCXoInw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- Notes: Version 2: - no change =20 Version 3: - no change src/qemu/qemu_capabilities.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3d8a1c1721..33b91d23dc 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5276,24 +5276,17 @@ virQEMUCapsFillDomainCPUCaps(virCapsPtr caps, =20 if (virQEMUCapsIsCPUModeSupported(qemuCaps, caps, domCaps->virttype, VIR_CPU_MODE_CUSTOM)) { - virDomainCapsCPUModelsPtr filtered =3D NULL; - char **models =3D NULL; const char *blacklist[] =3D { "host", NULL }; + VIR_AUTOSTRINGLIST models =3D NULL; =20 if (virCPUGetModels(domCaps->arch, &models) >=3D 0) { - virDomainCapsCPUModelsPtr cpus; - - if (domCaps->virttype =3D=3D VIR_DOMAIN_VIRT_KVM) - cpus =3D qemuCaps->kvmCPUModels; - else - cpus =3D qemuCaps->tcgCPUModels; - - filtered =3D virDomainCapsCPUModelsFilter(cpus, - (const char **)models, - blacklist); - virStringListFree(models); + domCaps->cpu.custom =3D virQEMUCapsGetCPUDefinitions(qemuCaps, + domCaps->vi= rttype, + (const char= **)models, + blacklist); + } else { + domCaps->cpu.custom =3D NULL; } - domCaps->cpu.custom =3D filtered; } =20 return 0; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list