From nobody Mon Sep 16 19:42:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1693924028; cv=none; d=zohomail.com; s=zohoarc; b=nMEYtoYSzlLK6+VMrLhdkR+MYGF92c4A71hE45iuVLumo9GiW62urlkYOP8a7h2/mIF+2En5nOXrRBQj3SwbE1svFn4+Lrx1PF+04+JpQhdJfcXVXUZX4E5dPCDp2GnnnUcKDKhKEUk+FDi3RRf+thTYZ+666Xng7BwmKsh44Rc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693924028; 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=whc1n3tJxyaBDD4dBQeNfYkLopG8PvVYob2Anm8uqgw=; b=n7oSuaxCfGlQliZDNRDuQNYBsjdTGqtLp/Q3A3cMUW23PzAitfXBy9orHm84ruRvSEch0QT4Edq06Jtdwj6v0q+lPNIt61heIkT5F4x6zmjhojSU6WA5jZN/5M1Xr3H9enD6miM5EtKyo0MjCqo73oXezO78swptUuocr+R7p2A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1693924028798684.8657312740269; Tue, 5 Sep 2023 07:27:08 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-307-JTn0WisqPXC7jYY1-3n-NA-1; Tue, 05 Sep 2023 10:25:39 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E68672800492; Tue, 5 Sep 2023 14:24:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF60A493110; Tue, 5 Sep 2023 14:24:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C08601946595; Tue, 5 Sep 2023 14:24:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9AFAA1946A4F for ; Tue, 5 Sep 2023 14:24:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 783731121319; Tue, 5 Sep 2023 14:24:46 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 025E31121314 for ; Tue, 5 Sep 2023 14:24:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693924027; 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=whc1n3tJxyaBDD4dBQeNfYkLopG8PvVYob2Anm8uqgw=; b=BLQshx0HEESKI0OpRqhkV36fY/dBa1bk5M73EZ+Uqy+m58TygGpk0sdBVJzoXc1HUgg+4U zRPDUS5V0WV1HG8cfrkPIDXM/xQ8TvAetwa5eHg/GyjTG+lLGPX2rtyT57BAMkaYei8guU MNTkkCq64GxWq0E1ydYtIGw0QbP++h8= X-MC-Unique: JTn0WisqPXC7jYY1-3n-NA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 21/51] virQEMUCapsAddCPUDefinitions: Fill in cpu type in data and node it's used only in tests Date: Tue, 5 Sep 2023 16:23:48 +0200 Message-ID: <5816246ea7e757489888eacc001ed6916ad9e9ef.1693923601.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1693924031030100003 Content-Type: text/plain; charset="utf-8" 'virQEMUCapsAddCPUDefinitions' is used solely to populate fake cpu models for the fake-caps tests. Note that and also populate the 'type' field so that default cpu type can be propagated properly. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 630be618bf..bd6a32b815 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2119,6 +2119,8 @@ bool virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps= *qemuCaps) } +/* Note that this function is invoked only by test code for faking support= ed cpu + * models */ int virQEMUCapsAddCPUDefinitions(virQEMUCaps *qemuCaps, virDomainVirtType type, @@ -2149,6 +2151,8 @@ virQEMUCapsAddCPUDefinitions(virQEMUCaps *qemuCaps, cpu->usable =3D usable; cpu->name =3D g_strdup(name[i]); + /* while the type name doesn't correspond with reality, this is ju= st for fake cpu models */ + cpu->type =3D g_strdup(name[i]); } return 0; --=20 2.41.0