qemu/hw/core
Thomas Huth 6516367fc0 hw/core/generic-loader: Fix crash when running without CPU
When running QEMU with "-M none -device loader,file=kernel.elf", it
currently crashes with a segmentation fault, because the "none"-machine
does not have any CPU by default and the generic loader code tries
to dereference s->cpu. Fix it by adding an appropriate check for a
NULL pointer.

Reported-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-05-10 10:19:23 +03:00
..
bus.c bus: do not unref hotplug handler 2017-03-01 11:51:28 +04:00
empty_slot.c
fw-path-provider.c
generic-loader.c hw/core/generic-loader: Fix crash when running without CPU 2017-05-10 10:19:23 +03:00
hotplug.c qdev: hotplug: drop HotplugHandler.post_plug callback 2016-11-15 17:20:37 +02:00
irq.c tcg: drop global lock during TCG code execution 2017-02-24 10:32:45 +00:00
loader-fit.c loader: Support Flattened Image Trees (FIT images) 2017-02-21 23:47:40 +00:00
loader.c elf-loader: Allow late loading of elf 2017-02-28 12:04:48 +01:00
machine.c numa,spapr: align default numa node memory size to 256MB 2017-03-22 11:32:42 +11:00
Makefile.objs loader: Support Flattened Image Trees (FIT images) 2017-02-21 23:47:40 +00:00
nmi.c nmi: remove x86 specific nmi handling 2016-05-23 16:53:46 +02:00
null-machine.c hw/core/null-machine: Print error message when using the -kernel parameter 2017-04-20 15:22:41 -03:00
or-irq.c hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet 2017-02-28 09:03:38 +03:00
platform-bus.c sysbus: Remove ignored return value of FindSysbusDeviceFunc 2016-09-27 17:03:34 -03:00
ptimer.c qemu-timer: do not include sysemu/cpus.h from util/qemu-timer.h 2017-03-14 13:28:18 +01:00
qdev-properties-system.c qdev: Constify local variable returned by blk_bs 2017-04-20 15:22:41 -03:00
qdev-properties.c qdev: Constify value passed to qdev_prop_set_macaddr 2017-04-20 15:22:41 -03:00
qdev.c migration/next for 20170421 2017-04-21 15:59:27 +01:00
register.c register: fix incorrect read mask 2017-02-28 09:03:38 +03:00
reset.c hw: move reset handlers from vl.c to hw/core 2017-01-16 17:52:35 +01:00
stream.c
sysbus.c hw: remove pio_addr_t 2016-05-19 16:42:30 +02:00
uboot_image.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00