From nobody Mon Feb 9 23:00:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1698153360; cv=none; d=zohomail.com; s=zohoarc; b=dn0etu2rijJ4yw03niAfOQYLzJPdPAp5VgXYWrOrhYA1FTZlCFnKSFnlue2Jdb8rI1TdFnoOZoCLM/LcMsBqWA+F/9EXBImH1T4X6dZ5mlPiQ1yg7meOlgpRElRCMpWLl2Nf9WyZsCW6eNLAktKUHWPUmBAqdf9dYcrkW7Huwqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698153360; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/NRSpUIijsQTQV6/Ab+Fo4l/3wg2rU3H4n9wtIAj/fI=; b=U2UWxVHg75TzYKGpIY01+k1pdZCa2MDvgmRr9tqXkIEJeiRRPFEFhMix4Lb+jX67za0Zt0vL5oUNf8n6AtTexnywPJHYRJ+1UePtUmcbfY/lKL2t+Op7m3QbVKkFAU+WFGONi8cZXgBeG6WUn+WcTRGPm5Ex36gQ1bO6sCPNaX8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1698153359998907.6584470903475; Tue, 24 Oct 2023 06:15:59 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-693-IRNXhq_jNIGDsXgaV_SIRw-1; Tue, 24 Oct 2023 09:15:51 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F57D857A85; Tue, 24 Oct 2023 13:15:48 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86F802026D66; Tue, 24 Oct 2023 13:15:48 +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 51CD1194658C; Tue, 24 Oct 2023 13:15:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4CB431946586 for ; Tue, 24 Oct 2023 13:15:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2FDA21C060BC; Tue, 24 Oct 2023 13:15:47 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 011211C060AE; Tue, 24 Oct 2023 13:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698153359; 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=/NRSpUIijsQTQV6/Ab+Fo4l/3wg2rU3H4n9wtIAj/fI=; b=X2bOUYVxn2hpygsaN+WMJaqtHgo6M1VihF/UbOE8rMSfx/4RIGkKUCCYwz9GPlqh4D8MXp 6L4C/h19uneMUaa0CUEtEwN7of3mFU2T/JBu+3sHh4kkrTcT0FuCPDGgX0zHgiffECOJHz ziuejuLSmgqsBSt+jCbW32KD7TxcwMg= X-MC-Unique: IRNXhq_jNIGDsXgaV_SIRw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Subject: [PULL 23/39] migration: rename vmstate_save_needed->vmstate_section_needed Date: Tue, 24 Oct 2023 15:12:49 +0200 Message-ID: <20231024131305.87468-24-quintela@redhat.com> In-Reply-To: <20231024131305.87468-1-quintela@redhat.com> References: <20231024131305.87468-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 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: Fam Zheng , Peter Maydell , Corey Minyard , libvir-list@redhat.com, Jason Wang , Mark Cave-Ayland , Li Zhijian , Peter Xu , Gerd Hoffmann , Eric Blake , Fabiano Rosas , qemu-block@nongnu.org, Juan Quintela , Daniel Henrique Barboza , Markus Armbruster , Halil Pasic , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Christian Borntraeger , Thomas Huth , Corey Minyard , Harsh Prateek Bora , Stefan Weil , Richard Henderson , Nicholas Piggin , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Stefan Hajnoczi , Samuel Thibault , David Hildenbrand , John Snow , David Gibson , Kevin Wolf , "Michael S. Tsirkin" , Ilya Leoshkevich , Hanna Reitz , Leonardo Bras , qemu-ppc@nongnu.org Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698153362245100001 From: Marc-Andr=C3=A9 Lureau The function is used on save at this point. The following commits will use it on load. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231024084043.2926316-5-marcandre.lureau@redhat.com> --- include/migration/vmstate.h | 2 +- migration/savevm.c | 2 +- migration/vmstate.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 1a31fb7293..1af181877c 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -1202,7 +1202,7 @@ int vmstate_save_state_v(QEMUFile *f, const VMStateDe= scription *vmsd, void *opaque, JSONWriter *vmdesc, int version_id, Error **errp); =20 -bool vmstate_save_needed(const VMStateDescription *vmsd, void *opaque); +bool vmstate_section_needed(const VMStateDescription *vmsd, void *opaque); =20 #define VMSTATE_INSTANCE_ID_ANY -1 =20 diff --git a/migration/savevm.c b/migration/savevm.c index 8622f229e5..ca5c7cebe0 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -985,7 +985,7 @@ static int vmstate_save(QEMUFile *f, SaveStateEntry *se= , JSONWriter *vmdesc) if ((!se->ops || !se->ops->save_state) && !se->vmsd) { return 0; } - if (se->vmsd && !vmstate_save_needed(se->vmsd, se->opaque)) { + if (se->vmsd && !vmstate_section_needed(se->vmsd, se->opaque)) { trace_savevm_section_skip(se->idstr, se->section_id); return 0; } diff --git a/migration/vmstate.c b/migration/vmstate.c index 1cf9e45b85..16e33a5d34 100644 --- a/migration/vmstate.c +++ b/migration/vmstate.c @@ -324,7 +324,7 @@ static void vmsd_desc_field_end(const VMStateDescriptio= n *vmsd, } =20 =20 -bool vmstate_save_needed(const VMStateDescription *vmsd, void *opaque) +bool vmstate_section_needed(const VMStateDescription *vmsd, void *opaque) { if (vmsd->needed && !vmsd->needed(opaque)) { /* optional section not needed */ @@ -522,7 +522,7 @@ static int vmstate_subsection_save(QEMUFile *f, const V= MStateDescription *vmsd, =20 trace_vmstate_subsection_save_top(vmsd->name); while (sub && *sub) { - if (vmstate_save_needed(*sub, opaque)) { + if (vmstate_section_needed(*sub, opaque)) { const VMStateDescription *vmsdsub =3D *sub; uint8_t len; =20 --=20 2.41.0