diff options
Diffstat (limited to 'hw/mem/pc-dimm.c')
-rw-r--r-- | hw/mem/pc-dimm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 08f49ed53b..92e276f2f4 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -252,6 +252,11 @@ 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) { + error_setg(errp, "'" PC_DIMM_NODE_PROP + "' exceeds numa node number: %" PRId32, nb_numa_nodes); + return; + } } static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm) |