From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9WPM-0003Ib-GQ for qemu-devel@nongnu.org; Thu, 06 Sep 2012 03:21:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9WPH-0001G6-V0 for qemu-devel@nongnu.org; Thu, 06 Sep 2012 03:21:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9WPH-0001Fk-Mr for qemu-devel@nongnu.org; Thu, 06 Sep 2012 03:21:43 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q867LhjA010896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Sep 2012 03:21:43 -0400 From: Gerd Hoffmann Date: Thu, 6 Sep 2012 09:21:32 +0200 Message-Id: <1346916100-12958-7-git-send-email-kraxel@redhat.com> In-Reply-To: <1346916100-12958-1-git-send-email-kraxel@redhat.com> References: <1346916100-12958-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 06/14] spice: adding seamless-migration option to the command line List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Yonit Halperin , Gerd Hoffmann From: Yonit Halperin The seamless-migration flag is required in order to identify whether libvirt supports the new QEVENT_SPICE_MIGRATE_COMPLETED or not (by default the flag is off). New libvirt versions that wait for QEVENT_SPICE_MIGRATE_COMPLETED should turn on this flag. When this flag is off, spice fallbacks to its old migration method, which can result in data loss. Signed-off-by: Yonit Halperin Signed-off-by: Gerd Hoffmann --- qemu-config.c | 3 +++ qemu-options.hx | 3 +++ ui/spice-core.c | 7 +++++++ 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index c05ffbc..eba977e 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -537,6 +537,9 @@ QemuOptsList qemu_spice_opts = { },{ .name = "playback-compression", .type = QEMU_OPT_BOOL, + }, { + .name = "seamless-migration", + .type = QEMU_OPT_BOOL, }, { /* end of list */ } }, diff --git a/qemu-options.hx b/qemu-options.hx index 3c411c4..96a7bb1 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -920,6 +920,9 @@ Enable/disable passing mouse events via vdagent. Default is on. @item playback-compression=[on|off] Enable/disable audio stream compression (using celt 0.5.1). Default is on. +@item seamless-migration=[on|off] +Enable/disable spice seamless migration. Default is off. + @end table ETEXI diff --git a/ui/spice-core.c b/ui/spice-core.c index ab069c5..ba0d0bd 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -585,6 +585,9 @@ void qemu_spice_init(void) int port, tls_port, len, addr_flags; spice_image_compression_t compression; spice_wan_compression_t wan_compr; +#if SPICE_SERVER_VERSION >= 0x000b02 /* 0.11.2 */ + bool seamless_migration; +#endif qemu_thread_get_self(&me); @@ -728,6 +731,10 @@ void qemu_spice_init(void) spice_server_set_uuid(spice_server, qemu_uuid); #endif +#if SPICE_SERVER_VERSION >= 0x000b02 /* 0.11.2 */ + seamless_migration = qemu_opt_get_bool(opts, "seamless-migration", 0); + spice_server_set_seamless_migration(spice_server, seamless_migration); +#endif if (0 != spice_server_init(spice_server, &core_interface)) { error_report("failed to initialize spice server"); exit(1); -- 1.7.1