From nobody Fri Nov 7 15:31:48 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548259582187438.3970057954207; Wed, 23 Jan 2019 08:06:22 -0800 (PST) Received: from localhost ([127.0.0.1]:37396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmL2i-000426-2G for importer@patchew.org; Wed, 23 Jan 2019 11:06:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmKvR-00070v-Ek for qemu-devel@nongnu.org; Wed, 23 Jan 2019 10:58:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmKvQ-0005V9-K7 for qemu-devel@nongnu.org; Wed, 23 Jan 2019 10:58:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33342) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmKvQ-0005Un-E6 for qemu-devel@nongnu.org; Wed, 23 Jan 2019 10:58:48 -0500 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 mx1.redhat.com (Postfix) with ESMTPS id 9E735C05B1E7; Wed, 23 Jan 2019 15:58:47 +0000 (UTC) Received: from dgilbert-t580.localhost (ovpn-117-254.ams2.redhat.com [10.36.117.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D24766D5E; Wed, 23 Jan 2019 15:58:45 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org Date: Wed, 23 Jan 2019 15:58:25 +0000 Message-Id: <20190123155830.8459-5-dgilbert@redhat.com> In-Reply-To: <20190123155830.8459-1-dgilbert@redhat.com> References: <20190123155830.8459-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 23 Jan 2019 15:58:47 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/9] migration: add more error handling for postcopy_ram_enable_notify 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: quintela@redhat.com, lifei1214@126.com, xiaoguangrong@tencent.com, peterx@redhat.com, shirley17fei@gmail.com, marcandre.lureau@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Fei Li Call postcopy_ram_incoming_cleanup() to do the cleanup when postcopy_ram_enable_notify fails. Besides, report the error message when qemu_ram_foreach_migratable_block() fails. Cc: Dr. David Alan Gilbert Signed-off-by: Fei Li Reviewed-by: Dr. David Alan Gilbert Message-Id: <20190113140849.38339-5-lifei1214@126.com> Signed-off-by: Dr. David Alan Gilbert --- migration/postcopy-ram.c | 1 + migration/savevm.c | 1 + 2 files changed, 2 insertions(+) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index e5c02a32c5..fa09dba534 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -1117,6 +1117,7 @@ int postcopy_ram_enable_notify(MigrationIncomingState= *mis) =20 /* Mark so that we get notified of accesses to unwritten areas */ if (qemu_ram_foreach_migratable_block(ram_block_enable_notify, mis)) { + error_report("ram_block_enable_notify failed"); return -1; } =20 diff --git a/migration/savevm.c b/migration/savevm.c index 9e45fb4f3f..d784e8aa40 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1729,6 +1729,7 @@ static int loadvm_postcopy_handle_listen(MigrationInc= omingState *mis) */ if (migrate_postcopy_ram()) { if (postcopy_ram_enable_notify(mis)) { + postcopy_ram_incoming_cleanup(mis); return -1; } } --=20 2.20.1