qemu-e2k/hw
Gavin Shan 99abb72520 hw/arm/virt: Don't create device-tree node for empty NUMA node
The empty NUMA node, where no memory resides, are allowed. For
example, the following command line specifies two empty NUMA nodes.
With this, QEMU fails to boot because of the conflicting device-tree
node names, as the following error message indicates.

  /home/gavin/sandbox/qemu.main/build/qemu-system-aarch64 \
  -accel kvm -machine virt,gic-version=host               \
  -cpu host -smp 4,sockets=2,cores=2,threads=1            \
  -m 1024M,slots=16,maxmem=64G                            \
  -object memory-backend-ram,id=mem0,size=512M            \
  -object memory-backend-ram,id=mem1,size=512M            \
  -numa node,nodeid=0,cpus=0-1,memdev=mem0                \
  -numa node,nodeid=1,cpus=2-3,memdev=mem1                \
  -numa node,nodeid=2                                     \
  -numa node,nodeid=3
    :
  qemu-system-aarch64: FDT: Failed to create subnode /memory@80000000: FDT_ERR_EXISTS

As specified by linux device-tree binding document, the device-tree
nodes for these empty NUMA nodes shouldn't be generated. However,
the corresponding NUMA node IDs should be included in the distance
map. The memory hotplug through device-tree on ARM64 isn't existing
so far and it's not necessary to require the user to provide a distance
map. Furthermore, the default distance map Linux generates may even be
sufficient. So this simply skips populating the device-tree nodes for
these empty NUMA nodes to avoid the error, so that QEMU can be started
successfully.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-Id: <20211015124246.23073-1-gshan@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2021-10-20 16:26:19 -07:00
..
9pfs
acpi nvdimm: release the correct device list 2021-10-05 17:30:57 -04:00
adc hw/adc: Add basic Aspeed ADC model 2021-10-12 08:20:08 +02:00
alpha
arm hw/arm/virt: Don't create device-tree node for empty NUMA node 2021-10-20 16:26:19 -07:00
audio qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
avr
block qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
char hw/char/mchp_pfsoc_mmuart: QOM'ify PolarFire MMUART 2021-10-07 08:41:33 +10:00
core Revert "cpu: Move cpu_common_props to hw/core/cpu.c" 2021-10-15 16:39:15 -07:00
cpu
cris
display macfb: add vertical blank interrupt 2021-10-08 13:31:03 +02:00
dma hw/dma: sifive_pdma: Don't run DMA when channel is disclaimed 2021-10-07 08:41:33 +10:00
gpio hw: aspeed_gpio: Fix GPIO array indexing 2021-10-12 08:20:08 +02:00
hppa
hyperv qbus: Rename qbus_create() to qbus_new() 2021-09-30 13:44:08 +01:00
i2c aspeed/i2c: QOMify AspeedI2CBus 2021-10-12 08:20:08 +02:00
i386 hw/i386/sgx: Move qmp_query_sgx() and hmp_info_sgx() to hw/i386/sgx.c 2021-10-13 10:47:50 +02:00
ide via-ide: Avoid using isa_get_irq() 2021-10-18 00:41:36 +02:00
input
intc * SGX implementation for x86 2021-09-30 17:38:31 +01:00
ipack qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
ipmi
isa vt82c686: Add a method to VIA_ISA to raise ISA interrupts 2021-10-18 00:41:36 +02:00
m68k q800: wire macfb IRQ to separate video interrupt on VIA2 2021-10-08 13:31:03 +02:00
mem kconfig: split CONFIG_SPARSE_MEM from fuzzing 2021-10-14 09:50:56 +02:00
microblaze
mips hw/mips/boston: Add FDT generator 2021-10-18 00:41:36 +02:00
misc Revert "hw/misc: applesmc: use host osk as default on macs" 2021-10-13 10:47:50 +02:00
net virtio-net: vhost control virtqueue support 2021-10-20 04:44:05 -04:00
nios2
nubus qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
nvme qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
nvram hw/nvram: Introduce Xilinx battery-backed ram 2021-09-30 13:42:10 +01:00
openrisc
pci pci: fix PCI resource reserve capability on BE 2021-10-20 06:18:17 -04:00
pci-bridge qdev: Make DeviceState.id independent of QemuOpts 2021-10-15 16:06:35 +02:00
pci-host pci: Rename pci_root_bus_new_inplace() to pci_root_bus_init() 2021-09-30 13:42:10 +01:00
pcmcia
ppc qdev: Make DeviceState.id independent of QemuOpts 2021-10-15 16:06:35 +02:00
rdma
remote hw/remote/proxy: Categorize Wireless devices as 'Network' ones 2021-10-04 09:47:26 +02:00
riscv hw/riscv: shakti_c: Mark as not user creatable 2021-10-07 08:41:33 +10:00
rtc
rx
s390x s390x/ipl: check kernel command line size 2021-10-13 16:20:55 +02:00
scsi block: introduce max_hw_iov for use in scsi-generic 2021-10-06 10:25:55 +02:00
sd qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
sensor hw/misc: Add Infineon DPS310 sensor model 2021-09-20 08:50:59 +02:00
sh4
smbios
sparc
sparc64
ssi aspeed/smc: Dump address offset in trace events 2021-10-12 08:20:08 +02:00
timer hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
tpm tpm: mark correct memory region range dirty when clearing RAM 2021-10-02 08:43:21 +02:00
tricore
usb qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
vfio qdev: Base object creation on QDict rather than QemuOpts 2021-10-15 16:11:22 +02:00
virtio vhost-vdpa: multiqueue support 2021-10-20 04:44:05 -04:00
watchdog aspeed/wdt: Add trace events 2021-10-12 08:20:08 +02:00
xen softmmu/qdev-monitor: add error handling in qdev_set_id 2021-10-15 16:08:46 +02:00
xenpv
xtensa
Kconfig hw/arm: xlnx-zcu102: Add Xilinx eFUSE device 2021-09-30 13:42:10 +01:00
meson.build