[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] 答复: Re: [PATCH] vhost: fix a migration failed because ofvh
From: |
peng.hao2 |
Subject: |
[Qemu-devel] 答复: Re: [PATCH] vhost: fix a migration failed because ofvhost region merge |
Date: |
Wed, 19 Jul 2017 16:12:55 +0800 (CST) |
发件人: <address@hidden>
收件人:彭浩10096742
抄送人: <address@hidden>王业超10154425 <address@hidden>
日 期 :2017年07月19日 15:51
主 题 :Re: [Qemu-devel] [PATCH] vhost: fix a migration failed because ofvhost
region merge
On Wed, 19 Jul 2017 23:17:32 +0800
Peng Hao <address@hidden> wrote:
> 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.
could you provide a bit more detailed description of the problem
including command line+used device_add commands on source and
command line on destination?
-------I just migrate guest vm. The guest has vhost-user net. Vhost-user has a
limit of slots
(VHOST_MEMORY_MAX_NREGIONS=8),hotplug memory (dimm) can increase vhost used
slots
,but vhost can merge region to decrease vhost used slots.
Before migration guset has hotplugged several dimms one by one (more than
vhost slot limit,
but after merging it less than vhost slot limit). In migrating to destination
host ,qemu begins to
execute restore guest and it realize foreach dimms device at a time and
compute whether vhost used slots more than vhost slot limit before merging.
So report "a used vhost backend has no free memory slots left".
I just make a distinction using a vm state.
>
> Signed-off-by: Peng Hao <address@hidden>
> Signed-off-by: Wang Yechao <address@hidden>
> ---
> 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
- [Qemu-devel] 答复: Re: [PATCH] vhost: fix a migration failed because ofvhost region merge,
peng.hao2 <=