qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vhost: fix a migration failed because of vhost region merge
@ 2017-07-19 15:17 Peng Hao
  2017-07-19  7:50 ` Igor Mammedov
  2017-07-19  8:36 ` no-reply
  0 siblings, 2 replies; 14+ messages in thread
From: Peng Hao @ 2017-07-19 15:17 UTC (permalink / raw)
  To: mst, imammedo; +Cc: qemu-devel, 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 <peng.hao2@zte.com.cn>
Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
---
 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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-07-24 13:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-19 15:17 [Qemu-devel] [PATCH] vhost: fix a migration failed because of vhost region merge Peng Hao
2017-07-19  7:50 ` Igor Mammedov
2017-07-19 11:46   ` Dr. David Alan Gilbert
2017-07-19 13:24     ` Igor Mammedov
2017-07-19 15:52       ` Michael S. Tsirkin
2017-07-20 17:22         ` Dr. David Alan Gilbert
2017-07-21 19:49           ` Michael S. Tsirkin
2017-07-24  8:06             ` Dr. David Alan Gilbert
2017-07-24 10:46               ` Igor Mammedov
2017-07-21 14:41         ` Igor Mammedov
2017-07-21 21:30           ` Michael S. Tsirkin
2017-07-24 10:05             ` Igor Mammedov
2017-07-24 13:01             ` Igor Mammedov
2017-07-19  8:36 ` no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).