From nobody Sun Feb 8 01:21:21 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=1693493732; cv=none; d=zohomail.com; s=zohoarc; b=ilkRSN2F2KsGvdIBKfOBDSJlHwL3zOOGOIFQeupYvOZJa6oNTJN/uMT2NukvZeB8CzZcNR+DeidFMYLs9HIFxZQ0j0CiEcdZTpnwK+tacbyNnlpw1zPodw+scGaxkzVv3RpcYk+5q2hdfUnmDTPWGH3Fp0uCYkSqAfS45j1hgS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693493732; h=Content-Type:Content-Transfer-Encoding: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=henSYvdeYBkMBjOadHvd77CZGWC0+Iz6DLQUM9fW5wY=; b=D8BeVMFo6N6q0W3XZEYaNvGjUy4RgYrtLWEDo+pZqRuvNgSTrzCfWuwLVyNPYu0JvxNg9zeY+iFTTXcxacbHGDcW0WtD+M5C4SoYtxsGdVmTK1S7Yv0GSegG22N9m48OS/7YlqYe4lliqB4IGjKK6zZZ78CmNB+c+qpk9Z3eshQ= 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 1693493732862192.34031697638; Thu, 31 Aug 2023 07:55:32 -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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-126-KS07_iycNWeP9hO5bmkyFA-1; Thu, 31 Aug 2023 10:55:27 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3C107101A528; Thu, 31 Aug 2023 14:55:24 +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 2567BC15BC0; Thu, 31 Aug 2023 14:55:24 +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 B272719451D0; Thu, 31 Aug 2023 14:55:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7D1A81946A71 for ; Thu, 31 Aug 2023 14:55:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5BCFE40C2070; Thu, 31 Aug 2023 14:55:14 +0000 (UTC) Received: from localhost.localdomain (unknown [10.45.224.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id F128640C2063 for ; Thu, 31 Aug 2023 14:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693493731; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=henSYvdeYBkMBjOadHvd77CZGWC0+Iz6DLQUM9fW5wY=; b=ZEhGRBpPmiO4yq/xLw2ArqN10/gY/ydUEDe8KmoGtl+fVAF/epLekoLy8I1DVQIlUwIuy5 113yCHs0sOHr6O8CNsrB+6/BpOsb/ONLv3vXBy2qPqLW/Ht0YT5dzA8zTB1XbimrMS93qe 9PnO8QheuEy5/6S/908wBwPvFpI4etg= X-MC-Unique: KS07_iycNWeP9hO5bmkyFA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 3/7] qemuSaveImageStartProcess: add snapshot argument Date: Thu, 31 Aug 2023 16:55:02 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1693493734377100005 Content-Type: text/plain; charset="utf-8"; x-default="true" When called from snapshot code we will need to pass snapshot object in order to make internal snapshots work correctly. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_saveimage.c | 6 ++++-- src/qemu/qemu_saveimage.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 1eedc900b9..73115af42d 100644 --- a/src/qemu/qemu_saveimage.c +++ b/src/qemu/qemu_saveimage.c @@ -572,6 +572,7 @@ qemuSaveImageOpen(virQEMUDriver *driver, * @vm: domain object * @fd: FD pointer of memory state file * @path: path to memory state file + * @snapshot: snapshot to load when starting QEMU process or NULL * @header: header from memory state file * @cookie: cookie from memory state file * @asyncJob: type of asynchronous job @@ -590,6 +591,7 @@ qemuSaveImageStartProcess(virConnectPtr conn, virDomainObj *vm, int *fd, const char *path, + virDomainMomentObj *snapshot, virQEMUSaveHeader *header, qemuDomainSaveCookie *cookie, virDomainAsyncJob asyncJob, @@ -634,7 +636,7 @@ qemuSaveImageStartProcess(virConnectPtr conn, priv->disableSlirp =3D true; =20 if (qemuProcessStart(conn, driver, vm, cookie ? cookie->cpu : NULL, - asyncJob, "stdio", *fd, path, NULL, + asyncJob, "stdio", *fd, path, snapshot, VIR_NETDEV_VPORT_PROFILE_OP_RESTORE, start_flags) =3D=3D 0) *started =3D true; @@ -701,7 +703,7 @@ qemuSaveImageStartVM(virConnectPtr conn, virDomainXMLOptionGetSaveCookie(driver->x= mlopt)) < 0) goto cleanup; =20 - if (qemuSaveImageStartProcess(conn, driver, vm, fd, path, header, cook= ie, + if (qemuSaveImageStartProcess(conn, driver, vm, fd, path, NULL, header= , cookie, asyncJob, start_flags, "restored", &star= ted) < 0) { goto cleanup; } diff --git a/src/qemu/qemu_saveimage.h b/src/qemu/qemu_saveimage.h index c6a701dcf5..c5ad50558e 100644 --- a/src/qemu/qemu_saveimage.h +++ b/src/qemu/qemu_saveimage.h @@ -63,6 +63,7 @@ qemuSaveImageStartProcess(virConnectPtr conn, virDomainObj *vm, int *fd, const char *path, + virDomainMomentObj *snapshot, virQEMUSaveHeader *header, qemuDomainSaveCookie *cookie, virDomainAsyncJob asyncJob, --=20 2.41.0