summaryrefslogtreecommitdiffstats
path: root/hw/mem/pc-dimm.c
diff options
context:
space:
mode:
authorPeter Maydell2014-09-30 14:09:39 +0200
committerPeter Maydell2014-09-30 14:09:40 +0200
commit2e456b2b606aef488de27f8212e22382141fa022 (patch)
tree39184cd190bedef458e5d9c698e9915ea49932b0 /hw/mem/pc-dimm.c
parentMerge remote-tracking branch 'remotes/rth/tags/tcg-next-201400729' into staging (diff)
parentvl: Adjust the place of calling mlockall to speedup VM's startup (diff)
downloadqemu-2e456b2b606aef488de27f8212e22382141fa022.tar.gz
qemu-2e456b2b606aef488de27f8212e22382141fa022.tar.xz
qemu-2e456b2b606aef488de27f8212e22382141fa022.zip
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pci, pc, virtio, misc bugfixes A bunch of bugfixes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 29 Sep 2014 17:59:57 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: vl: Adjust the place of calling mlockall to speedup VM's startup pc-dimm: Don't check dimm->node when there is non-NUMA config pci-hotplug-old: avoid losing error message Revert "virtio-pci: fix migration for pci bus master" loader: g_realloc(p, 0) frees and returns NULL, simplify Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/mem/pc-dimm.c')
-rw-r--r--hw/mem/pc-dimm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 5bfc5b7483..a800ea7a9f 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);