From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD2Ly-0005iI-9F for qemu-devel@nongnu.org; Wed, 08 Jul 2015 23:18:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZD2Lu-0007Zw-Ur for qemu-devel@nongnu.org; Wed, 08 Jul 2015 23:18:26 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:38719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD2Lu-0007ZG-C6 for qemu-devel@nongnu.org; Wed, 08 Jul 2015 23:18:22 -0400 From: zhanghailiang Date: Thu, 9 Jul 2015 11:16:40 +0800 Message-ID: <1436411802-181876-33-git-send-email-zhang.zhanghailiang@huawei.com> In-Reply-To: <1436411802-181876-1-git-send-email-zhang.zhanghailiang@huawei.com> References: <1436411802-181876-1-git-send-email-zhang.zhanghailiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH COLO-Frame v7 32/34] COLO: Disable qdev hotplug when VM is in COLO mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lizhijian@cn.fujitsu.com, quintela@redhat.com, yunhong.jiang@intel.com, eddie.dong@intel.com, peter.huangpeng@huawei.com, dgilbert@redhat.com, arei.gonglei@huawei.com, amit.shah@redhat.com, Yang Hongyang , zhanghailiang COLO do not support qdev hotplug migration, disable it. Signed-off-by: zhanghailiang Signed-off-by: Yang Hongyang --- migration/colo.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index 3dc7eee..f5bad95 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -10,6 +10,7 @@ * later. See the COPYING file in the top-level directory. */ +#include "hw/qdev-core.h" #include "qemu/timer.h" #include "sysemu/sysemu.h" #include "migration/colo.h" @@ -348,6 +349,7 @@ out: static void *colo_thread(void *opaque) { MigrationState *s = opaque; + int dev_hotplug = qdev_hotplug; QEMUFile *colo_control = NULL; int64_t current_time, checkpoint_time = qemu_clock_get_ms(QEMU_CLOCK_HOST); int i, ret; @@ -363,6 +365,8 @@ static void *colo_thread(void *opaque) goto out; } + qdev_hotplug = 0; + /* * Wait for Secondary finish loading vm states and enter COLO * restore. @@ -459,6 +463,8 @@ out: qemu_bh_schedule(s->cleanup_bh); qemu_mutex_unlock_iothread(); + qdev_hotplug = dev_hotplug; + return NULL; } @@ -516,10 +522,13 @@ void *colo_process_incoming_checkpoints(void *opaque) struct colo_incoming *colo_in = opaque; QEMUFile *f = colo_in->file; int fd = qemu_get_fd(f); + int dev_hotplug = qdev_hotplug; QEMUFile *ctl = NULL, *fb = NULL; int i, ret; uint64_t total_size; + qdev_hotplug = 0; + colo = qemu_coroutine_self(); assert(colo != NULL); @@ -701,5 +710,7 @@ out: loadvm_exit_colo(); + qdev_hotplug = dev_hotplug; + return NULL; } -- 1.7.12.4