From nobody Mon Feb 9 17:57:37 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=1636043342; cv=none; d=zohomail.com; s=zohoarc; b=EbtLTQc5HpUnVvMR8edFu0tVtrDpYRpUNBeVUha+R4u3JjkRG/FA8tQTTxqifA9qrp19/Sj97Iv9XA0Gf/gV6yZZAr5X8Vzl0scfac89DuxAsIV4KXYUBilL2YAt9W5UYHKFexhV66VhzFQZrvxd4moi4VZ45Fx805/LMhOD78A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636043342; 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=s3rqkWtaWFk4QqHey9k+NYabhJG8USQ2bbXhn2yWaZo=; b=l24nzndoURXoF366hAw9JskFidt7Gtej3savY9z5OLBnCgLm+fNGe1G+UR8S6N0uQqQksl+E1OPlW35kKKA/0i3IWkblnxreDuNJrrL+oza7ZkQsGukimJSRiMISCQaoD4+RsJ3j88sElZpsj8mZ7UZbbDiJ98moaZXfuHEomfk= 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 1636043342410931.7266482103084; Thu, 4 Nov 2021 09:29:02 -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-75-rIyG7q77PtyEtmpAAI3IGQ-1; Thu, 04 Nov 2021 12:27:57 -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 A4331BD544; Thu, 4 Nov 2021 16:27:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45C3260CA0; Thu, 4 Nov 2021 16:27:46 +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 0BEF41806D03; Thu, 4 Nov 2021 16:27:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1A4GRZQj026461 for ; Thu, 4 Nov 2021 12:27:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3C20819D9F; Thu, 4 Nov 2021 16:27:35 +0000 (UTC) Received: from work.speedport.ip (unknown [10.39.193.164]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8648C19C79; Thu, 4 Nov 2021 16:27:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636043341; 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=s3rqkWtaWFk4QqHey9k+NYabhJG8USQ2bbXhn2yWaZo=; b=f7l9X1RYkShY9GUBm0zmGJOGVcPVE1QL7s1Eaj/4aRSnhdkmnGnZG2SpTLasNGFe9Oe0og GWDnnkDOYfdbFUGvJy4dE7MfwQfNxAW4RyJ/bLIycz/woNYuwOrj3iqa4bZASHqNQFcwVH +0Z9eaSukzC1f8Off5NQjv5VkeRPVbg= X-MC-Unique: rIyG7q77PtyEtmpAAI3IGQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 13/20] cpu_arm: Implement virCPUDataNewCopy for arm Date: Thu, 4 Nov 2021 17:27:13 +0100 Message-Id: <20211104162720.108973-14-twiederh@redhat.com> In-Reply-To: <20211104162720.108973-1-twiederh@redhat.com> References: <20211104162720.108973-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: 1636043343477100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/cpu/cpu_arm.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c index c9114d53bf..51a3c1f3ee 100644 --- a/src/cpu/cpu_arm.c +++ b/src/cpu/cpu_arm.c @@ -150,6 +150,25 @@ virCPUarmDataIsIdentical(const virCPUData *a, return VIR_CPU_COMPARE_IDENTICAL; } =20 +static virCPUData * +virCPUarmDataCopyNew(virCPUData *data) +{ + virCPUData *copy; + size_t i; + + if (!data) + return NULL; + + copy =3D virCPUDataNew(data->arch); + copy->data.arm.pvr =3D data->data.arm.pvr; + copy->data.arm.vendor_id =3D data->data.arm.vendor_id; + copy->data.arm.features =3D g_new0(char *, MAX_CPU_FLAGS + 1); + for (i =3D 0; i < MAX_CPU_FLAGS; ++i) + copy->data.arm.features[i] =3D g_strdup(data->data.arm.features[i]= ); + + return copy; +} + static void virCPUarmDataFree(virCPUData *cpuData) { @@ -696,6 +715,7 @@ struct cpuArchDriver cpuDriverArm =3D { #endif .decode =3D NULL, .encode =3D NULL, + .dataCopyNew =3D virCPUarmDataCopyNew, .dataFree =3D virCPUarmDataFree, .baseline =3D virCPUarmBaseline, .update =3D virCPUarmUpdate, --=20 2.31.1