294aa0437b
When parsing cpus= attribute of -numa object couple of checks is performed, such as correct initiator setting (see the if() statement at the end of for() loop in machine_set_cpu_numa_node()). However, with the current code cpus= attribute is parsed before initiator= attribute and thus the check may fail even though it is not obvious why. But since parsing the initiator= attribute does not depend on the cpus= attribute we can swap the order of the two. It's fairly easy to reproduce with the following command line (snippet of an actual cmd line): -smp 4,sockets=4,cores=1,threads=1 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2147483648}' \ -numa node,nodeid=0,cpus=0-1,initiator=0,memdev=ram-node0 \ -object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":2147483648}' \ -numa node,nodeid=1,cpus=2-3,initiator=1,memdev=ram-node1 \ -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-latency,latency=5 \ -numa hmat-lb,initiator=0,target=0,hierarchy=first-level,data-type=access-latency,latency=10 \ -numa hmat-lb,initiator=1,target=1,hierarchy=memory,data-type=access-latency,latency=5 \ -numa hmat-lb,initiator=1,target=1,hierarchy=first-level,data-type=access-latency,latency=10 \ -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-bandwidth,bandwidth=204800K \ -numa hmat-lb,initiator=0,target=0,hierarchy=first-level,data-type=access-bandwidth,bandwidth=208896K \ -numa hmat-lb,initiator=1,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=204800K \ -numa hmat-lb,initiator=1,target=1,hierarchy=first-level,data-type=access-bandwidth,bandwidth=208896K \ -numa hmat-cache,node-id=0,size=10K,level=1,associativity=direct,policy=write-back,line=8 \ -numa hmat-cache,node-id=1,size=10K,level=1,associativity=direct,policy=write-back,line=8 \ Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <b27a6a88986d63e3f610a728c845e01ff8d92e2e.1625662776.git.mprivozn@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> |
||
---|---|---|
.. | ||
bus.c | ||
clock-vmstate.c | ||
clock.c | ||
cpu-common.c | ||
cpu-sysemu.c | ||
fw-path-provider.c | ||
generic-loader.c | ||
guest-loader.c | ||
guest-loader.h | ||
hotplug.c | ||
irq.c | ||
Kconfig | ||
loader-fit.c | ||
loader.c | ||
machine-hmp-cmds.c | ||
machine-qmp-cmds.c | ||
machine.c | ||
meson.build | ||
nmi.c | ||
null-machine.c | ||
numa.c | ||
or-irq.c | ||
platform-bus.c | ||
ptimer.c | ||
qdev-clock.c | ||
qdev-fw.c | ||
qdev-prop-internal.h | ||
qdev-properties-system.c | ||
qdev-properties.c | ||
qdev.c | ||
register.c | ||
reset.c | ||
resettable.c | ||
split-irq.c | ||
stream.c | ||
sysbus.c | ||
trace-events | ||
trace.h | ||
uboot_image.h | ||
vm-change-state-handler.c | ||
vmstate-if.c |