From nobody Mon Feb 9 22:39:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496345264068399.1093961451668; Thu, 1 Jun 2017 12:27:44 -0700 (PDT) Received: from localhost ([::1]:46359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGVl0-0007kn-O5 for importer@patchew.org; Thu, 01 Jun 2017 15:27:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGVh4-0004OK-Sa for qemu-devel@nongnu.org; Thu, 01 Jun 2017 15:23:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGVh4-0004rp-3P for qemu-devel@nongnu.org; Thu, 01 Jun 2017 15:23:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34382) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dGVh3-0004rT-To for qemu-devel@nongnu.org; Thu, 01 Jun 2017 15:23:38 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ECCADC0587C1 for ; Thu, 1 Jun 2017 19:23:36 +0000 (UTC) Received: from secure.mitica (ovpn-117-3.ams2.redhat.com [10.36.117.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E62C53CC2; Thu, 1 Jun 2017 19:23:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ECCADC0587C1 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=quintela@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com ECCADC0587C1 From: Juan Quintela To: qemu-devel@nongnu.org Date: Thu, 1 Jun 2017 21:23:15 +0200 Message-Id: <20170601192327.29712-4-quintela@redhat.com> In-Reply-To: <20170601192327.29712-1-quintela@redhat.com> References: <20170601192327.29712-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 01 Jun 2017 19:23:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 03/15] migration: Remove section_id parameter from vmstate_load X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Everything else assumes that we always load a device from its own savevm handler. Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier Reviewed-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert --- migration/savevm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index d96209b..2d1d4bc 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -746,13 +746,13 @@ void vmstate_unregister(DeviceState *dev, const VMSta= teDescription *vmsd, } } =20 -static int vmstate_load(QEMUFile *f, SaveStateEntry *se, int version_id) +static int vmstate_load(QEMUFile *f, SaveStateEntry *se) { trace_vmstate_load(se->idstr, se->vmsd ? se->vmsd->name : "(old)"); if (!se->vmsd) { /* Old style */ - return se->ops->load_state(f, se->opaque, version_id); + return se->ops->load_state(f, se->opaque, se->load_version_id); } - return vmstate_load_state(f, se->vmsd, se->opaque, version_id); + return vmstate_load_state(f, se->vmsd, se->opaque, se->load_version_id= ); } =20 static void vmstate_save_old_style(QEMUFile *f, SaveStateEntry *se, QJSON = *vmdesc) @@ -1882,7 +1882,7 @@ qemu_loadvm_section_start_full(QEMUFile *f, Migration= IncomingState *mis) return -EINVAL; } =20 - ret =3D vmstate_load(f, se, se->load_version_id); + ret =3D vmstate_load(f, se); if (ret < 0) { error_report("error while loading state for instance 0x%x of" " device '%s'", instance_id, idstr); @@ -1915,7 +1915,7 @@ qemu_loadvm_section_part_end(QEMUFile *f, MigrationIn= comingState *mis) return -EINVAL; } =20 - ret =3D vmstate_load(f, se, se->load_version_id); + ret =3D vmstate_load(f, se); if (ret < 0) { error_report("error while loading state section id %d(%s)", section_id, se->idstr); --=20 2.9.4