Received: from eggs.gnu.org ([2001:4830:134:3::10]:36494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXj1c-0007hn-5i for qemu-devel@nongnu.org; Wed, 19 Jul 2017 03:04:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXj1Y-0005Q2-8k for qemu-devel@nongnu.org; Wed, 19 Jul 2017 03:04:00 -0400 Received: from mxhk.zte.com.cn ([63.217.80.70]:38607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXj1X-0005Ha-Mi for qemu-devel@nongnu.org; Wed, 19 Jul 2017 03:03:56 -0400 From: Peng Hao Date: Wed, 19 Jul 2017 23:17:32 +0800 Message-Id: <1500477452-59643-1-git-send-email-peng.hao2@zte.com.cn> Subject: [Qemu-devel] [PATCH] vhost: fix a migration failed because of vhost region merge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mst@redhat.com, imammedo@redhat.com Cc: qemu-devel@nongnu.org, Peng Hao , Wang Yechao When a guest that has several hotplugged dimms is migrated, in destination host it will fail to resume. Because vhost regions of several dimms in source host are merged and in the restore stage in destination host it computes whether more than vhost slot limit before merging vhost regions of several dimms. Signed-off-by: Peng Hao Signed-off-by: Wang Yechao --- hw/mem/pc-dimm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index ea67b46..bb0fa08 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -101,7 +101,7 @@ void pc_dimm_memory_plug(DeviceState *dev, MemoryHotplugState *hpms, goto out; } - if (!vhost_has_free_slot()) { + if (!vhost_has_free_slot() && runstate_is_running()) { error_setg(&local_err, "a used vhost backend has no free" " memory slots left"); goto out; -- 1.8.3.1