qemu-irix/hw/i386
Igor Mammedov 87ede19db3 pc: fix crash in rtc_set_memory() if initial cpu is marked as hotplugged
'hotplugged' propperty is meant to be used on migration side when migrating
source with hotplugged devices.
However though it not exacly correct usage of 'hotplugged' property
it's possible to set generic hotplugged property for CPU using
 -cpu foo,hotplugged=on
or
 -global foo.hotplugged=on

in this case qemu crashes with following backtrace:

...

because pc_cpu_plug() assumes that hotplugged CPU could appear only after
rtc/fw_cfg are initialized.
Fix crash by replacing assumption with explicit checks of rtc/fw_cfg
and updating them only if they were initialized.

Cc: qemu-stable@nongnu.org
Reported-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1483108391-199542-1-git-send-email-imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 26ef65beab)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2017-03-16 12:10:39 -05:00
..
kvm pci-assign: sync MSI/MSI-X cap and table with PCIDevice 2016-11-28 15:11:17 +01:00
xen xen_platform: SUSE xenlinux unplug for emulated PCI 2016-10-21 12:11:38 -07:00
Makefile.objs hw/i386: Introduce AMD IOMMU 2016-09-24 01:02:00 +03:00
acpi-build.c loader: fix handling of custom address spaces when adding ROM blobs 2016-11-30 04:20:57 +02:00
acpi-build.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
amd_iommu.c hw/iommu: Fix problems reported by Coverity scan 2016-10-04 10:00:21 +02:00
amd_iommu.h hw/i386: Introduce AMD IOMMU 2016-09-24 01:02:00 +03:00
intel_iommu.c intel_iommu: fix incorrect device invalidate 2016-11-30 04:20:57 +02:00
intel_iommu_internal.h intel_iommu: fixing source id during IOTLB hash key calculation 2016-11-15 17:20:36 +02:00
kvmvapic.c *_run_on_cpu: introduce run_on_cpu_data type 2016-10-31 15:00:25 +01:00
multiboot.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc.c pc: fix crash in rtc_set_memory() if initial cpu is marked as hotplugged 2017-03-16 12:10:39 -05:00
pc_piix.c pc: Add 2.8 machine 2016-09-09 20:58:34 +03:00
pc_q35.c pc: q35: Bump max_cpus to 288 2016-10-24 17:29:15 -02:00
pc_sysfw.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
pci-assign-load-rom.c pci-assign: Move "Invalid ROM" error message to pci-assign-load-rom.c 2016-06-29 14:03:47 +02:00
trace-events trace: move hw/mem/pc-dimm.c trace points into correct file 2016-09-28 19:17:54 +01:00
x86-iommu.c hw/i386: AMD IOMMU IVRS table 2016-09-24 01:02:01 +03:00