Re: [Qemu-devel] [FIX PATCH] pc-dimm: Fail pc-dimm realization for invalid nodes in non-NUMA configuration

2015-09-24 Thread Bharata B Rao
On Wed, Aug 26, 2015 at 01:24:08PM -0300, Eduardo Habkost wrote:
> Applied to the numa tree, with the following changes in the commit
> message:
> 
> Subject was changed to:
>   pc-dimm: Fail realization for invalid nodes in non-NUMA config
> to make it shorter.

Hmm I don't see it here:
https://github.com/ehabkost/qemu/commits/numa

Regards,
Bharata.




Re: [Qemu-devel] [FIX PATCH] pc-dimm: Fail pc-dimm realization for invalid nodes in non-NUMA configuration

2015-09-24 Thread Eduardo Habkost
On Thu, Sep 24, 2015 at 11:53:30AM +0530, Bharata B Rao wrote:
> On Wed, Aug 26, 2015 at 01:24:08PM -0300, Eduardo Habkost wrote:
> > Applied to the numa tree, with the following changes in the commit
> > message:
> > 
> > Subject was changed to:
> >   pc-dimm: Fail realization for invalid nodes in non-NUMA config
> > to make it shorter.
> 
> Hmm I don't see it here:
> https://github.com/ehabkost/qemu/commits/numa

Sorry, forgot to push it. It should be there, now.

-- 
Eduardo



Re: [Qemu-devel] [FIX PATCH] pc-dimm: Fail pc-dimm realization for invalid nodes in non-NUMA configuration

2015-08-26 Thread Eduardo Habkost
Applied to the numa tree, with the following changes in the commit
message:

Subject was changed to:
  pc-dimm: Fail realization for invalid nodes in non-NUMA config
to make it shorter.

On Fri, Jul 17, 2015 at 06:19:40PM +0530, Bharata B Rao wrote:
 pc_dimm_realize() validates the NUMA node to which memory hotplug is
 being performed only in case of NUMA configuration. Include a check
 to fail invalid nodes in case of non-NUMA configuration too.

Changed to to fail for invalid nodes.

 
 Signed-off-by: Bharata B Rao bhar...@linux.vnet.ibm.com

Thanks!

-- 
Eduardo



Re: [Qemu-devel] [FIX PATCH] pc-dimm: Fail pc-dimm realization for invalid nodes in non-NUMA configuration

2015-08-02 Thread Bharata B Rao
On Mon, Jul 20, 2015 at 09:15:28AM +0200, Igor Mammedov wrote:
 On Fri, 17 Jul 2015 18:19:40 +0530
 Bharata B Rao bhar...@linux.vnet.ibm.com wrote:
 
  pc_dimm_realize() validates the NUMA node to which memory hotplug is
  being performed only in case of NUMA configuration. Include a check
  to fail invalid nodes in case of non-NUMA configuration too.
  
  Signed-off-by: Bharata B Rao bhar...@linux.vnet.ibm.com
 Reviewed-by: Igor Mammedov imamm...@redhat.com
 
  ---
   hw/mem/pc-dimm.c | 5 +++--
   1 file changed, 3 insertions(+), 2 deletions(-)
  
  diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
  index bb04862..099025e 100644
  --- a/hw/mem/pc-dimm.c
  +++ b/hw/mem/pc-dimm.c
  @@ -414,10 +414,11 @@ static void pc_dimm_realize(DeviceState *dev, Error 
  **errp)
   error_setg(errp, ' PC_DIMM_MEMDEV_PROP ' property is not set);
   return;
   }
  -if ((nb_numa_nodes  0)  (dimm-node = nb_numa_nodes)) {
  +if (((nb_numa_nodes  0)  (dimm-node = nb_numa_nodes)) ||
  +(!nb_numa_nodes  dimm-node)) {
   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);
  +   dimm-node, nb_numa_nodes ? nb_numa_nodes : 1);
   return;
   }
   }

Eduardo - Will this go via your tree ?

Regards,
Bharata.




Re: [Qemu-devel] [FIX PATCH] pc-dimm: Fail pc-dimm realization for invalid nodes in non-NUMA configuration

2015-07-20 Thread Igor Mammedov
On Fri, 17 Jul 2015 18:19:40 +0530
Bharata B Rao bhar...@linux.vnet.ibm.com wrote:

 pc_dimm_realize() validates the NUMA node to which memory hotplug is
 being performed only in case of NUMA configuration. Include a check
 to fail invalid nodes in case of non-NUMA configuration too.
 
 Signed-off-by: Bharata B Rao bhar...@linux.vnet.ibm.com
Reviewed-by: Igor Mammedov imamm...@redhat.com

 ---
  hw/mem/pc-dimm.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
 index bb04862..099025e 100644
 --- a/hw/mem/pc-dimm.c
 +++ b/hw/mem/pc-dimm.c
 @@ -414,10 +414,11 @@ static void pc_dimm_realize(DeviceState *dev, Error 
 **errp)
  error_setg(errp, ' PC_DIMM_MEMDEV_PROP ' property is not set);
  return;
  }
 -if ((nb_numa_nodes  0)  (dimm-node = nb_numa_nodes)) {
 +if (((nb_numa_nodes  0)  (dimm-node = nb_numa_nodes)) ||
 +(!nb_numa_nodes  dimm-node)) {
  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);
 +   dimm-node, nb_numa_nodes ? nb_numa_nodes : 1);
  return;
  }
  }




Re: [Qemu-devel] [FIX PATCH] pc-dimm: Fail pc-dimm realization for invalid nodes in non-NUMA configuration

2015-07-19 Thread David Gibson
On Fri, Jul 17, 2015 at 06:19:40PM +0530, Bharata B Rao wrote:
 pc_dimm_realize() validates the NUMA node to which memory hotplug is
 being performed only in case of NUMA configuration. Include a check
 to fail invalid nodes in case of non-NUMA configuration too.
 
 Signed-off-by: Bharata B Rao bhar...@linux.vnet.ibm.com

Reviewed-by: David Gibson da...@gibson.dropbear.id.au

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson


pgpLc5yj5qgMN.pgp
Description: PGP signature


[Qemu-devel] [FIX PATCH] pc-dimm: Fail pc-dimm realization for invalid nodes in non-NUMA configuration

2015-07-17 Thread Bharata B Rao
pc_dimm_realize() validates the NUMA node to which memory hotplug is
being performed only in case of NUMA configuration. Include a check
to fail invalid nodes in case of non-NUMA configuration too.

Signed-off-by: Bharata B Rao bhar...@linux.vnet.ibm.com
---
 hw/mem/pc-dimm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index bb04862..099025e 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -414,10 +414,11 @@ static void pc_dimm_realize(DeviceState *dev, Error 
**errp)
 error_setg(errp, ' PC_DIMM_MEMDEV_PROP ' property is not set);
 return;
 }
-if ((nb_numa_nodes  0)  (dimm-node = nb_numa_nodes)) {
+if (((nb_numa_nodes  0)  (dimm-node = nb_numa_nodes)) ||
+(!nb_numa_nodes  dimm-node)) {
 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);
+   dimm-node, nb_numa_nodes ? nb_numa_nodes : 1);
 return;
 }
 }
-- 
2.1.0