qemu-e2k/hw
Mark Cave-Ayland e97a8a5926 sun4m: fix setting CPU id when more than one CPU is present
Commit 24f675cd3b ("sparc/sun4m: Use start-powered-off CPUState property") changed
the sun4m CPU reset code to use the start-powered-off property and so split the
creation of the CPU into separate instantiation and realization phases to enable
the new start-powered-off property to be set.

This accidentally broke sun4m machines with more than one CPU present since
sparc_cpu_realizefn() sets a default CPU id, and now that realization occurs after
calling cpu_sparc_set_id() in cpu_devinit() the CPU id gets reset back to the
default instead of being uniquely encoded based upon the CPU number. As soon as
another CPU is brought online, the OS gets confused between them and promptly
panics.

Resolve the issue by moving the cpu_sparc_set_id() call in cpu_devinit() to after
the point where the CPU device has been realized as before.

Fixes: 24f675cd3b ("sparc/sun4m: Use start-powered-off CPUState property")
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210825095100.20180-1-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2021-09-08 11:09:45 +01:00
..
9pfs 9pfs: fix crash in v9fs_walk() 2021-09-02 13:26:22 +02:00
acpi hw/acpi: use existing references to pci device struct within functions 2021-09-04 17:34:05 -04:00
adc
alpha
arm arm: Remove system_clock_scale global 2021-09-01 11:08:21 +01:00
audio
avr
block
char hw/char: Add config for shakti uart 2021-09-01 11:59:12 +10:00
core Block patches: 2021-09-02 13:00:52 +01:00
cpu
cris
display hw/display/artist: Fix bug in coordinate extraction in artist_vram_read() and artist_vram_write() 2021-08-31 14:38:53 +02:00
dma hw/dma/xlnx-zdma Always expect 'dma' link property to be set 2021-08-26 17:01:59 +01:00
gpio
hppa
hyperv
i2c
i386 hw/i386/acpi-build: Get NUMA information from struct NumaState 2021-09-04 17:34:04 -04:00
ide
input
intc arm: Move system PPB container handling to armv7m 2021-09-01 11:08:18 +01:00
ipack
ipmi
isa q35: catch invalid cpu hotplug configuration 2021-09-04 09:07:45 -04:00
m68k
mem
microblaze
mips arch_init.h: Don't include arch_init.h unnecessarily 2021-08-26 17:02:00 +01:00
misc arm: Move M-profile RAS register block into its own device 2021-09-01 11:08:18 +01:00
net vhost_net: do not assume nvqs is always 2 2021-09-04 17:34:05 -04:00
nios2
nubus
nvme hw/nvme: fix missing variable initializers 2021-08-09 12:52:16 +02:00
nvram
openrisc
pci
pci-bridge hw/pcie-root-port: Fix hotplug for PCI devices requiring IO 2021-08-03 16:31:07 -04:00
pci-host hw/pci: remove all references to find_i440fx function 2021-09-04 17:34:05 -04:00
pcmcia
ppc hw: Add compat machines for 6.2 2021-09-01 11:08:16 +01:00
rdma
remote Remove superfluous ERRP_GUARD() 2021-08-26 17:15:28 +02:00
riscv hw/riscv/virt.c: Assemble plic_hart_config string with g_strjoinv() 2021-09-01 11:59:12 +10:00
rtc
rx
s390x s390x/cpumodel: Add more feature to gen16 default model 2021-09-07 13:36:43 +02:00
scsi vhost-scsi: Plug memory leak on migrate_add_blocker() failure 2021-08-26 17:15:28 +02:00
sd hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30 2021-08-03 19:34:51 +02:00
sensor
sh4
smbios
sparc sun4m: fix setting CPU id when more than one CPU is present 2021-09-08 11:09:45 +01:00
sparc64
ssi
timer arm: Remove system_clock_scale global 2021-09-01 11:08:21 +01:00
tpm
tricore
usb hw/usb: Fix typo in comments and print 2021-09-01 06:37:13 +02:00
vfio vfio-ccw: forward halt/clear errors 2021-09-06 16:22:54 +02:00
virtio vhost-vdpa: correctly return err in vhost_vdpa_set_backend_cap() 2021-09-04 17:34:05 -04:00
watchdog
xen
xenpv
xtensa
Kconfig
meson.build