From nobody Sun Feb 8 20:01:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1728383313935965.6587001696213; Tue, 8 Oct 2024 03:28:33 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D70AE1497; Tue, 8 Oct 2024 06:28:32 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A82C51491; Tue, 8 Oct 2024 06:27:16 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id ABBEF13CA; Tue, 8 Oct 2024 06:27:11 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C5EC612A6 for ; Tue, 8 Oct 2024 06:26:57 -0400 (EDT) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-278-bb_xo9ljO_m0jSk7WTs_EQ-1; Tue, 08 Oct 2024 06:26:56 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 57D3B19560A2 for ; Tue, 8 Oct 2024 10:26:55 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DACEA19560A2 for ; Tue, 8 Oct 2024 10:26:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728383217; h=from:from: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; bh=wtc+GKhE6NpL/ld7HN/5UxQJkOT5YUdiXrjcwWvaWrw=; b=Djz0rKzPyxoSZchiutkfSh7cQa1GSBcg6DJoydRK1F9yDld5JxbDM1IbysuMq0qbRBlgKF 9Zhq+I2hVGHbWOi29il97GsSvo96tAJH0OzI19WVsvKiBKZEbNKBWZM0WYphhJvYSnmGla sMW9YAC/vtX2opbEkXQrUfABMXMgbcA= X-MC-Unique: bb_xo9ljO_m0jSk7WTs_EQ-1 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 3/7] cpu-data.py: Properly handle aliases Date: Tue, 8 Oct 2024 12:26:42 +0200 Message-ID: <52530b4bf4af46af947135a39cbceca86fbb4c51.1728383133.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: YLRMDEAOZW5R46B5FF4U35CXZSLZMYCO X-Message-ID-Hash: YLRMDEAOZW5R46B5FF4U35CXZSLZMYCO X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1728383315153116600 Content-Type: text/plain; charset="utf-8" The script is used to create data files for cputest from QEMU replies. By ignoring aliases we might end up thinking a feature is not enabled by QEMU just because its name differs from the primary one in the CPU map. Signed-off-by: Jiri Denemark --- tests/cputestdata/cpu-data.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/cputestdata/cpu-data.py b/tests/cputestdata/cpu-data.py index 37fb2e3791..b280eed436 100755 --- a/tests/cputestdata/cpu-data.py +++ b/tests/cputestdata/cpu-data.py @@ -457,6 +457,11 @@ def parseMap(): for reg in _KEYS[data.tag] + _REGS[data.tag]: feature[reg] =3D int(data.attrib.get(reg, "0"), 0) cpuMap[f.attrib["name"]] =3D feature + + for alias in f.iterfind("alias"): + if alias.attrib["source"] =3D=3D "qemu": + cpuMap[alias.attrib["name"]] =3D feature + return cpuMap =20 =20 --=20 2.46.2