Skip to contentSkip to conversation

NUMA queue, 2015-10-06

GIT PULL Applied Eduardo Habkost 2 participants 3 messages Oct 6, 2015 – Oct 8, 2015

lore
Share & tools
lore
#0 lore raw

The following changes since commit 5fdb4671b08e0d1631447e81348b2b50a6b85bf7:

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-10-06 13:42:33 +0100)

are available in the git repository at:

git://github.com/ehabkost/qemu.git tags/numa-pull-request

for you to fetch changes up to 32532f215c49f005aaef942adfae34cbcc5fa678:

pc-dimm: Fail realization for invalid nodes in non-NUMA config (2015-10-06 16:51:08 -0300)

----------------------------------------------------------------
NUMA queue, 2015-10-06

----------------------------------------------------------------

Bharata B Rao (1):
pc-dimm: Fail realization for invalid nodes in non-NUMA config

 hw/mem/pc-dimm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.1.0
#1 lore raw

[Qemu-devel] [PULL 1/1] pc-dimm: Fail realization for invalid nodes in non-NUMA config

From: Bharata B Rao <[email protected]>

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 for invalid nodes in case of non-NUMA configuration too.

---
 hw/mem/pc-dimm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
hw/mem/pc-dimm.c +3 -2
index 6cc6ac3..506fe0d 100644
@@ -417,10 +417,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;
     }
 }
Signature · 1 line
2.1.0
#2 lore raw
In reply to Eduardo Habkost
Quoted 8 lines · Eduardo Habkost

The following changes since commit 5fdb4671b08e0d1631447e81348b2b50a6b85bf7:

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-10-06 13:42:33 +0100)

are available in the git repository at:

git://github.com/ehabkost/qemu.git tags/numa-pull-request

Quoted 8 lines

for you to fetch changes up to 32532f215c49f005aaef942adfae34cbcc5fa678:

pc-dimm: Fail realization for invalid nodes in non-NUMA config (2015-10-06 16:51:08 -0300)

----------------------------------------------------------------
NUMA queue, 2015-10-06

----------------------------------------------------------------

Applied, thanks.

-- PMM