From nobody Thu Dec 5 01:41:22 2024 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 1732311621766277.2497213167667; Fri, 22 Nov 2024 13:40:21 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 260D1169C; Fri, 22 Nov 2024 16:40:21 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id AC91515FA; Fri, 22 Nov 2024 16:34:31 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 5E3911621; Fri, 22 Nov 2024 16:34:21 -0500 (EST) 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 A3C2415BA for ; Fri, 22 Nov 2024 16:33:43 -0500 (EST) Received: from mx-prod-mc-05.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-156-ixoPvalYMKmlFfnvnGc45w-1; Fri, 22 Nov 2024 16:33:41 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0A363195608C for ; Fri, 22 Nov 2024 21:33:41 +0000 (UTC) Received: from orkuz (unknown [10.45.224.26]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 818DC30000DF for ; Fri, 22 Nov 2024 21:33:40 +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=1732311223; 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=1RR32Ss6Q3GGI7j0E8z6fyzgMRv1vsvv82gPc7ArGnw=; b=KlGQaOWo1yHnW/gixs8lO+BIBGnq7DvtbAws3q9/ox0X7ZBanwuQ0BQ3P4Epn1iJFV7R7g gGH/IShJcGJxkWE4+osDi2XVPl5k5Y/xelp6ovJXqRA6WsIooMRSCHsFGp93e0d8yMMcdc cqU4ZOZo2YIUcegvvMPMJ3AbO8siveg= X-MC-Unique: ixoPvalYMKmlFfnvnGc45w-1 X-Mimecast-MFC-AGG-ID: ixoPvalYMKmlFfnvnGc45w From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH v2 10/36] cpu_map: Properly group models in index.xml Date: Fri, 22 Nov 2024 22:32:50 +0100 Message-ID: <49cb20e64c43905eff11a47d6bc454a159caf6ca.1732311125.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 1MouHMt7hfngvrRra0AiGzGdpbOJnkxOSHyWXS2gVJw_1732311221 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JW5CZOUSRPQN2LYGYHYMOFXHFJGL5F63 X-Message-ID-Hash: JW5CZOUSRPQN2LYGYHYMOFXHFJGL5F63 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: 1732311622753116600 Content-Type: text/plain; charset="utf-8" We already visually group the included models using comments. This patch introduces a new element for doing it properly in a machine friendly way. Signed-off-by: Jiri Denemark Reviewed-by: Daniel P. Berrang=C3=A9 --- Notes: Best viewed with "git show -w". =20 Version 2: - use for all groups rather than a strange mix of and src/cpu/cpu_map.c | 2 +- src/cpu_map/index.xml | 226 ++++++++++++++++++++++-------------------- 2 files changed, 121 insertions(+), 107 deletions(-) diff --git a/src/cpu/cpu_map.c b/src/cpu/cpu_map.c index 16795a9a0a..83ebee16a8 100644 --- a/src/cpu/cpu_map.c +++ b/src/cpu/cpu_map.c @@ -116,7 +116,7 @@ loadIncludes(xmlXPathContextPtr ctxt, int n; size_t i; =20 - n =3D virXPathNodeSet("include", ctxt, &nodes); + n =3D virXPathNodeSet("include|group[@name]/include", ctxt, &nodes); if (n < 0) return -1; =20 diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml index 15cb63afe5..65128be377 100644 --- a/src/cpu_map/index.xml +++ b/src/cpu_map/index.xml @@ -3,122 +3,136 @@ =20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =20 =20 - - - - - - - - - - + + + + + + + + + + + + =20 =20 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.47.0