From patchwork Fri Jun 29 16:43:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 168212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4B8BBB6F9A for ; Sat, 30 Jun 2012 03:03:59 +1000 (EST) Received: from localhost ([::1]:55903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkeJO-0006S4-7D for incoming@patchwork.ozlabs.org; Fri, 29 Jun 2012 12:44:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkeIr-00053w-VZ for qemu-devel@nongnu.org; Fri, 29 Jun 2012 12:44:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SkeIq-00056G-9i for qemu-devel@nongnu.org; Fri, 29 Jun 2012 12:44:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkeIq-00055n-2U for qemu-devel@nongnu.org; Fri, 29 Jun 2012 12:44:16 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5TGiEnA002763 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 29 Jun 2012 12:44:14 -0400 Received: from trasno.mitica (ovpn-116-23.ams2.redhat.com [10.36.116.23]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q5TGi4Fk027488; Fri, 29 Jun 2012 12:44:13 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 29 Jun 2012 18:43:56 +0200 Message-Id: <06dc7c681d59f42e2aff1d134a467701a85a4d88.1340987905.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Orit Wasserman Subject: [Qemu-devel] [PATCH 05/13] Add migration_end function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Orit Wasserman Signed-off-by: Orit Wasserman Signed-off-by: Juan Quintela --- arch_init.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index 78b3c0c..f5fd1f5 100644 --- a/arch_init.c +++ b/arch_init.c @@ -304,6 +304,11 @@ static void sort_ram_list(void) g_free(blocks); } +static void migration_end(void) +{ + memory_global_dirty_log_stop(); +} + int ram_save_live(QEMUFile *f, int stage, void *opaque) { ram_addr_t addr; @@ -313,7 +318,7 @@ int ram_save_live(QEMUFile *f, int stage, void *opaque) int ret; if (stage < 0) { - memory_global_dirty_log_stop(); + migration_end(); return 0; } @@ -381,7 +386,7 @@ int ram_save_live(QEMUFile *f, int stage, void *opaque) while ((bytes_sent = ram_save_block(f)) != 0) { bytes_transferred += bytes_sent; } - memory_global_dirty_log_stop(); + migration_end(); } qemu_put_be64(f, RAM_SAVE_FLAG_EOS);