Commit b9cedbf
hw/riscv: qemu crash when NUMA nodes exceed available CPUs
Command "qemu-system-riscv64 -machine virt
-m 2G -smp 1 -numa node,mem=1G -numa node,mem=1G"
would trigger this problem.Backtrace with:
#0 0x0000555555b5b1a4 in riscv_numa_get_default_cpu_node_id at ../hw/riscv/numa.c:211
#1 0x00005555558ce510 in machine_numa_finish_cpu_init at ../hw/core/machine.c:1230
qemu#2 0x00005555558ce9d3 in machine_run_board_init at ../hw/core/machine.c:1346
qemu#3 0x0000555555aaedc3 in qemu_init_board at ../softmmu/vl.c:2513
qemu#4 0x0000555555aaf064 in qmp_x_exit_preconfig at ../softmmu/vl.c:2609
qemu#5 0x0000555555ab1916 in qemu_init at ../softmmu/vl.c:3617
qemu#6 0x000055555585463b in main at ../softmmu/main.c:47
This commit fixes the issue by adding parameter checks.
Reviewed-by: Alistair Francis <[email protected]>
Reviewed-by: Daniel Henrique Barboza <[email protected]>
Reviewed-by: LIU Zhiwei <[email protected]>
Reviewed-by: Weiwei Li <[email protected]>
Signed-off-by: Yin Wang <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>1 parent a828ba9 commit b9cedbf
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
| |||
0 commit comments