qemu-e2k/hw/core
Daniel P. Berrangé ea0aa1752c hw/core: fix error checking in smp_parse
machine_set_smp() mistakenly checks 'errp' not '*errp',
and so thinks there is an error every single time it runs.
This causes it to jump to the end of the method, skipping
the max CPUs checks. The caller meanwhile sees no error
and so carries on execution. The result of all this is:

 $ qemu-system-x86_64 -smp -1
 qemu-system-x86_64: GLib: ../glib/gmem.c:142: failed to allocate 481036337048 bytes

instead of

 $ qemu-system-x86_64 -smp -1
 qemu-system-x86_64: Invalid SMP CPUs -1. The max CPUs supported by machine 'pc-i440fx-6.1' is 255

This is a regression from

  commit fe68090e8f
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   Thu May 13 09:03:48 2021 -0400

    machine: add smp compound property

Closes: https://gitlab.com/qemu-project/qemu/-/issues/524
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20210812175353.4128471-1-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-08-13 14:43:42 +02:00
..
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 hw/core: fix error checking in smp_parse 2021-08-13 14:43:42 +02:00
meson.build
nmi.c
null-machine.c
numa.c numa: Parse initiator= attribute before cpus= attribute 2021-07-13 09:21:01 -04:00
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