From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv61u-0005gW-PC for qemu-devel@nongnu.org; Wed, 20 May 2015 11:35:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yv61t-0002p6-HY for qemu-devel@nongnu.org; Wed, 20 May 2015 11:35:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv61t-0002p0-5l for qemu-devel@nongnu.org; Wed, 20 May 2015 11:35:33 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4KFZWTY029912 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 20 May 2015 11:35:32 -0400 From: Juan Quintela Date: Wed, 20 May 2015 17:35:24 +0200 Message-Id: <1432136124-24572-4-git-send-email-quintela@redhat.com> In-Reply-To: <1432136124-24572-1-git-send-email-quintela@redhat.com> References: <1432136124-24572-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] migration: Add migration events on target side List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, jdenemar@redhat.com We reuse the migration events from the source side, sending them on the appropiate place. Signed-off-by: Juan Quintela --- migration/migration.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 6b1cead..2bf587b 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -89,6 +89,7 @@ void qemu_start_incoming_migration(const char *uri, Error **errp) { const char *p; + qapi_event_send_migration(MIGRATION_STATUS_SETUP, &error_abort); if (!strcmp(uri, "defer")) { deferred_incoming_migration(errp); } else if (strstart(uri, "tcp:", &p)) { @@ -116,14 +117,17 @@ static void process_incoming_migration_co(void *opaque) Error *local_err = NULL; int ret; + qapi_event_send_migration(MIGRATION_STATUS_ACTIVE, &error_abort); ret = qemu_loadvm_state(f); qemu_fclose(f); free_xbzrle_decoded_buf(); if (ret < 0) { + qapi_event_send_migration(MIGRATION_STATUS_FAILED, &error_abort); error_report("load of migration failed: %s", strerror(-ret)); migrate_decompress_threads_join(); exit(EXIT_FAILURE); } + qapi_event_send_migration(MIGRATION_STATUS_COMPLETED, &error_abort); qemu_announce_self(); /* Make sure all file formats flush their mutable metadata */ -- 2.4.1