diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-11-06 15:50:16 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-11-11 03:13:05 -0500 |
commit | be81ba604260f4beae1522241c579eeda1b891fb (patch) | |
tree | 817c74ee841bb2faee30fb96878332a5939410ff /hw/misc | |
parent | 14c81b2191fffb61cd6d2a7a839d34ec2d5e09a1 (diff) | |
download | qemu-be81ba604260f4beae1522241c579eeda1b891fb.zip qemu-be81ba604260f4beae1522241c579eeda1b891fb.tar.gz qemu-be81ba604260f4beae1522241c579eeda1b891fb.tar.bz2 |
hw/mem/pc-dimm: Restrict NUMA-specific code to NUMA machines
When trying to use the pc-dimm device on a non-NUMA machine, we get:
$ qemu-system-arm -M none -cpu max -S \
-object memory-backend-file,id=mem1,size=1M,mem-path=/tmp/1m \
-device pc-dimm,id=dimm1,memdev=mem1
Segmentation fault (core dumped)
(gdb) bt
#0 pc_dimm_realize (dev=0x555556da3e90, errp=0x7fffffffcd10) at hw/mem/pc-dimm.c:184
#1 0x0000555555fe1f8f in device_set_realized (obj=0x555556da3e90, value=true, errp=0x7fffffffce18) at hw/core/qdev.c:531
#2 0x0000555555feb4a9 in property_set_bool (obj=0x555556da3e90, v=0x555556e54420, name=0x5555563c3c41 "realized", opaque=0x555556a704f0, errp=0x7fffffffce18) at qom/object.c:2257
To avoid that crash, restrict the pc-dimm NUMA check to machines
supporting NUMA, and do not allow the use of 'node' property on
non-NUMA machines.
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211106145016.611332-1-f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/misc')
0 files changed, 0 insertions, 0 deletions