From nobody Mon Feb 9 15:11:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633950181; cv=none; d=zohomail.com; s=zohoarc; b=LTrsPUPStT0necu7mTXZBF9D8MIg7I68SiCj5U4hITZtIZ/H4QkcBSi30asahsBmDERL7n1yKRspXWomkT/yeV/H4NWFJyMi+Hz0dYvRDSSddrbssc3YhuBWeJXA4r+kb+I5NfB3dL4naly6wyJXYwPHRtf75nP8dKooMG2MfrM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633950181; 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=R9siTCEIsGzPSqwN6BpvP0ctGLWdIVv5TRt1inYmDnU=; b=egLb6VJDXcvAJgaaeUJgustLVAb6Tv6VeVadyaUSNUz6J56npUVYllWj2tAoXiYIN/i2ThoVFTh/JQ5tybmA9hZjjP0824gUlbUXF4fxxyZMb4AiZgUVPpjtkHMY1LW1ykew2o0a9XRQUArQy9UOSFv8ZgLnIHfHT/0M6/4Up7o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633950181056271.0887748238416; Mon, 11 Oct 2021 04:03:01 -0700 (PDT) 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-363-uWB7R1elOjetaHoisb5H3g-1; Mon, 11 Oct 2021 07:02:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4885810A8E05; Mon, 11 Oct 2021 11:02:51 +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 1BC2560C5F; Mon, 11 Oct 2021 11:02:51 +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 BF6D24EA3C; Mon, 11 Oct 2021 11:02:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19BB2igg012828 for ; Mon, 11 Oct 2021 07:02:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5E95360C82; Mon, 11 Oct 2021 11:02:44 +0000 (UTC) Received: from work.redhat.com (unknown [10.39.193.160]) by smtp.corp.redhat.com (Postfix) with ESMTP id A75D460C5F; Mon, 11 Oct 2021 11:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633950180; 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=R9siTCEIsGzPSqwN6BpvP0ctGLWdIVv5TRt1inYmDnU=; b=glJBSKt7SKVWevtpW0phSjHG1DxOQS9taB6nVr54xPFWVHPwc48x8F75ylr3oce2LWKPnf CMWKh2pNH3Ue5ZDsxYYiMRvWhAVltowfBvE3kc4C3i+56r7nyhUR9LE1b48JP/t1mhLA27 OvHacKir+58tjnacwi+qjxlYF+vVh9U= X-MC-Unique: uWB7R1elOjetaHoisb5H3g-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 5/5] cpu_ppc64: Implement virCPUDataIsIdentical for ppc64 Date: Mon, 11 Oct 2021 13:02:28 +0200 Message-Id: <20211011110228.46312-6-twiederh@redhat.com> In-Reply-To: <20211011110228.46312-1-twiederh@redhat.com> References: <20211011110228.46312-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1633950182467100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/cpu/cpu_ppc64.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 4909f61ff1..fcd68c8a7c 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -578,6 +578,31 @@ ppc64DriverDecode(virCPUDef *cpu, return 0; } =20 +static virCPUCompareResult +virCPUppc64DataIsIdentical(const virCPUData *a, + const virCPUData *b) +{ + size_t i; + + if (!a || !b) + return VIR_CPU_COMPARE_ERROR; + + if (a->arch !=3D b->arch) + return VIR_CPU_COMPARE_INCOMPATIBLE; + + if (a->data.ppc64.len !=3D b->data.ppc64.len) + return VIR_CPU_COMPARE_INCOMPATIBLE; + + for (i =3D 0; i < a->data.ppc64.len; ++i) { + if (a->data.ppc64.pvr[i].mask !=3D b->data.ppc64.pvr[i].mask) + return VIR_CPU_COMPARE_INCOMPATIBLE; + if (a->data.ppc64.pvr[i].value !=3D b->data.ppc64.pvr[i].value) + return VIR_CPU_COMPARE_INCOMPATIBLE; + } + + return VIR_CPU_COMPARE_IDENTICAL; +} + static void virCPUppc64DataFree(virCPUData *data) { @@ -749,4 +774,5 @@ struct cpuArchDriver cpuDriverPPC64 =3D { .update =3D virCPUppc64Update, .getModels =3D virCPUppc64DriverGetModels, .convertLegacy =3D virCPUppc64ConvertLegacy, + .dataIsIdentical =3D virCPUppc64DataIsIdentical, }; --=20 2.31.1