From nobody Tue Feb 10 01:19:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1666969688; cv=none; d=zohomail.com; s=zohoarc; b=bcadGCU9i2qASKWunQU793uR0J5z5a+hmA8wHX3i/ycM1o9Sfcl27OoPWvrr2S9J+9LIc5OMB2DKVIA120YNO59Lb/QQaXq4mQlJhkPXFsY6G7YfRaLpEWnw75nVhKqQgaq+dxG40g8xA8PCgYCLReR0DJCIciDWyXWSXaxnbZU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666969688; h=Content-Type:Content-Transfer-Encoding:Cc: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=SzQ09cQzg4vtf5PNl+19RS6nPL2+suL4GtGvRfEA9rc=; b=F5rDpVtKVEaCcE3UeXCFt2A+pFOLEfcShYHfOjZpMUuV9v05b+rawZBiQsK9g2PHryKFrBNk1nlnSvpDHZMUlEFRP7Pz3uKeQYTgd3H6UTUelXomatn9X29z0dVI7jXLxP6nsa5mksA//a2bnGTLgq1l6E0eGGQpsl/6ZmIApFw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1666969688016400.3564997959327; Fri, 28 Oct 2022 08:08:08 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.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-671-UhHVcT7iN7-ok4yAuCAbhw-1; Fri, 28 Oct 2022 11:07:04 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 794681C0CE6B; Fri, 28 Oct 2022 15:07:01 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F1A5111E403; Fri, 28 Oct 2022 15:07:01 +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 2F06D19466DF; Fri, 28 Oct 2022 15:07:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 42E081947068 for ; Fri, 28 Oct 2022 15:06:59 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 29FDF17593; Fri, 28 Oct 2022 15:06:59 +0000 (UTC) Received: from work.fritz.box (unknown [10.39.193.205]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8805A4221F; Fri, 28 Oct 2022 15:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666969686; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=SzQ09cQzg4vtf5PNl+19RS6nPL2+suL4GtGvRfEA9rc=; b=FJP/75iPnwwuST6OR3ZGK5j4Gu24OydC62/QBkXMKtZfEuRzBpr0TRAw6+SBxBqx+HcIvz 7W0WGLf6A83J48/gND4n2tn7MxHhdzeV/bp4M2AggaF8O4UUMN/mNaiXePcGEtO/D94dcX hTOVq01mt47V7GSPMX0imbi7C2iiQUo= X-MC-Unique: UhHVcT7iN7-ok4yAuCAbhw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 02/24] cpu_x86: Ignore alias names Date: Fri, 28 Oct 2022 17:06:33 +0200 Message-Id: <20221028150655.17925-3-twiederh@redhat.com> In-Reply-To: <20221028150655.17925-1-twiederh@redhat.com> References: <20221028150655.17925-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Cc: Jiri Denemark , Tim Wiederhake Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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: 1666969688756100007 Content-Type: text/plain; charset="utf-8"; x-default="true" A later patch will add alias names to the feature map. Ignore them for now. Signed-off-by: Tim Wiederhake Reviewed-by: Jiri Denemark --- src/cpu/cpu_x86.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 4d2379803c..d2560de497 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -1089,7 +1089,7 @@ static int x86ParseDataItemList(virCPUx86Data *cpudata, xmlNodePtr node) { - size_t i; + size_t i =3D 0; =20 if (xmlChildElementCount(node) <=3D 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no x86 CPU data fo= und")); @@ -1097,9 +1097,14 @@ x86ParseDataItemList(virCPUx86Data *cpudata, } =20 node =3D xmlFirstElementChild(node); - for (i =3D 0; node; ++i) { + while (node) { virCPUx86DataItem item; =20 + if (virXMLNodeNameEqual(node, "alias")) { + node =3D xmlNextElementSibling(node); + continue; + } + if (virXMLNodeNameEqual(node, "cpuid")) { if (x86ParseCPUID(node, &item) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -1116,6 +1121,7 @@ x86ParseDataItemList(virCPUx86Data *cpudata, =20 if (virCPUx86DataAddItem(cpudata, &item) < 0) return -1; + ++i; =20 node =3D xmlNextElementSibling(node); } --=20 2.36.1