qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break hot


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break hotplug memory feature
Date: Fri, 19 Sep 2014 14:37:46 +0200

On Tue, 16 Sep 2014 18:39:15 +0800
zhanghailiang <address@hidden> wrote:

> If we do not configure numa option, memory hotplug should work as well.
> It should not depend on numa option.
> 
> Steps to reproduce:
> (1) Start VM: qemu-kvm -m 1024,slots=4,maxmem=8G
> (2) Hotplug memory
> It will fail and reports:
> "'DIMM property node has value 0' which exceeds the number of numa nodes: 0"
> 
> Signed-off-by: zhanghailiang <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 5bfc5b7..a800ea7 100644
> --- a/hw/mem/pc-dimm.c
> +++ b/hw/mem/pc-dimm.c
> @@ -252,7 +252,7 @@ static void pc_dimm_realize(DeviceState *dev, Error 
> **errp)
>          error_setg(errp, "'" PC_DIMM_MEMDEV_PROP "' property is not set");
>          return;
>      }
> -    if (dimm->node >= nb_numa_nodes) {
> +    if ((nb_numa_nodes > 0) && (dimm->node >= nb_numa_nodes)) {
>          error_setg(errp, "'DIMM property " PC_DIMM_NODE_PROP " has value %"
>                     PRIu32 "' which exceeds the number of numa nodes: %d",
>                     dimm->node, nb_numa_nodes);

Reviewed-By: Igor Mammedov <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]