From patchwork Fri Jul 4 17:41:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 367176 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4895214009C for ; Sat, 5 Jul 2014 03:57:35 +1000 (EST) Received: from localhost ([::1]:37490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X37jp-00016p-JZ for incoming@patchwork.ozlabs.org; Fri, 04 Jul 2014 13:57:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X37Vm-0007w7-Os for qemu-devel@nongnu.org; Fri, 04 Jul 2014 13:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X37Vg-0000Sn-Kx for qemu-devel@nongnu.org; Fri, 04 Jul 2014 13:43:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X37Vg-0000Sf-Bq for qemu-devel@nongnu.org; Fri, 04 Jul 2014 13:42:56 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s64Hgrq0013871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Jul 2014 13:42:53 -0400 Received: from dgilbert-t530.home.treblig.org (vpn1-7-141.ams2.redhat.com [10.36.7.141]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s64HfvU1030576; Fri, 4 Jul 2014 13:42:52 -0400 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org Date: Fri, 4 Jul 2014 18:41:43 +0100 Message-Id: <1404495717-4239-33-git-send-email-dgilbert@redhat.com> In-Reply-To: <1404495717-4239-1-git-send-email-dgilbert@redhat.com> References: <1404495717-4239-1-git-send-email-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, lilei@linux.vnet.ibm.com, quintela@redhat.com Subject: [Qemu-devel] [PATCH 32/46] mig fd_connect: open return path 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: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- migration.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/migration.c b/migration.c index c73fcfa..c7ba6a1 100644 --- a/migration.c +++ b/migration.c @@ -1164,6 +1164,18 @@ void migrate_fd_connect(MigrationState *s) /* Notify before starting migration thread */ notifier_list_notify(&migration_state_notifiers, s); + /* Open the return path; currently for postcopy but other things might + * also want it. + */ + if (migrate_postcopy_ram()) { + if (open_outgoing_return_path(s)) { + error_report("Unable to open return-path for postcopy"); + migrate_set_state(s, MIG_STATE_SETUP, MIG_STATE_ERROR); + migrate_fd_cleanup(s); + return; + } + } + qemu_thread_create(&s->thread, "migration", migration_thread, s, QEMU_THREAD_JOINABLE); }