qemu-patch-raspberry4/hw
Peter Maydell 7474f1be70 qdev_try_create(): Assert that devices we put onto the system bus are SysBusDevices
If qdev_try_create() is passed NULL for the bus, it will automatically
put the newly created device onto the default system bus. However
if the device is not actually a SysBusDevice then this will result
in later crashes (for instance when running the monitor "info qtree"
command) because code reasonably assumes that all devices on the system
bus are system bus devices.

Generally the mistake is that the calling code should create the
object with object_new(TYPE_FOO) rather than qdev_create(NULL, TYPE_FOO);
see commit 6749695eaa for an example of fixing this bug.

Assert in qdev_try_create() if the device isn't suitable to put on
the system bus, so that this mistake results in failure earlier
and more reliably.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
2016-06-14 15:07:43 +01:00
..
9pfs all: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
acpi acpi: make bios_linker_loader_add_checksum() API offset based 2016-06-07 15:39:27 +03:00
alpha alpha: include cpu-qom.h in files that require AlphaCPU 2016-05-19 16:42:27 +02:00
arm vl: Eliminate usb_enabled() 2016-06-13 13:24:41 +02:00
audio audio: Use DIV_ROUND_UP 2016-06-07 18:19:25 +03:00
block trivial patches for 2016-06-07 2016-06-07 16:34:45 +01:00
bt bt: rewrite csrhci_write to avoid out-of-bounds writes 2016-05-29 09:11:11 +02:00
char hw/char: QOM'ify escc.c (fix) 2016-06-06 18:57:06 +02:00
core qdev_try_create(): Assert that devices we put onto the system bus are SysBusDevices 2016-06-14 15:07:43 +01:00
cpu explicitly include qom/cpu.h 2016-05-19 16:42:27 +02:00
cris hw/char: QOM'ify etraxfs_ser.c 2016-05-29 09:11:10 +02:00
display xen: Use DIV_ROUND_UP 2016-06-07 18:19:24 +03:00
dma hw: explicitly include qemu/log.h 2016-05-19 16:42:29 +02:00
gpio hw: clean up hw/hw.h includes 2016-05-19 16:42:30 +02:00
i2c i2c: add aspeed i2c controller 2016-06-06 16:59:29 +01:00
i386 vl: Eliminate usb_enabled() 2016-06-13 13:24:41 +02:00
ide macio: call dma_memory_unmap() at the end of each DMA transfer 2016-06-14 10:43:24 +10:00
input hw: explicitly include qemu/log.h 2016-05-19 16:42:29 +02:00
intc s390x/kvm: add interface for clearing IO irqs 2016-06-14 13:34:50 +02:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi hw/ipmi: fix spelling 2016-06-07 18:02:48 +03:00
isa ICH9: fix typo 2016-06-07 18:19:23 +03:00
lm32 hw/char: QOM'ify milkymist-uart.c 2016-05-29 09:11:10 +02:00
m68k hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
mem pc-dimm: introduce realize callback 2016-06-07 15:39:28 +03:00
microblaze hw/char: QOM'ify xilinx_uartlite model 2016-06-06 16:59:32 +01:00
mips mips: use MIPSCPU instead of CPUMIPSState 2016-05-19 16:42:27 +02:00
misc dbdma: use DMA memory interface for memory accesses 2016-06-07 10:17:45 +10:00
moxie hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
net rocker: Use DIV_ROUND_UP 2016-06-07 18:19:25 +03:00
nvram fw_cfg: follow CODING_STYLE 2016-06-07 18:19:23 +03:00
openrisc hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
pci pcie: Introduce function for DSN capability creation 2016-06-02 10:42:26 +08:00
pci-bridge hw/pci-bridge: Add missing unref in case register-bus fails 2016-04-07 19:57:33 +03:00
pci-host hw: explicitly include qemu/log.h 2016-05-19 16:42:29 +02:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc spapr: Ensure all LMBs are represented in ibm,dynamic-memory 2016-06-14 13:20:01 +10:00
s390x s390x: Limit s390-ccw machines to 248 CPUs 2016-06-14 14:00:05 +02:00
scsi * max-ram-below-4g improvement (Gerd) 2016-06-08 14:45:28 +01:00
sd hw: explicitly include qemu/log.h 2016-05-19 16:42:29 +02:00
sh4 cpu: move exec-all.h inclusion out of cpu.h 2016-05-19 16:42:29 +02:00
smbios include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
sparc vl: Replace DT_NOGRAPHIC with machine option 2016-05-20 14:28:54 -03:00
sparc64 util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
ssi hw: explicitly include qemu/log.h 2016-05-19 16:42:29 +02:00
timer hw: Clean up includes 2016-06-07 18:19:23 +03:00
tpm tpm: Fix write to file descriptor function 2016-04-13 19:52:34 +03:00
tricore hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
unicore32 hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
usb hw/usb/dev-network.c: Use ldl_le_p() and stl_le_p() 2016-06-13 13:18:51 +02:00
vfio vfio: Check that IOMMU MR translates to system address space 2016-05-26 11:12:09 -06:00
virtio -----BEGIN PGP SIGNATURE----- 2016-06-07 15:59:28 +01:00
watchdog nmi: remove x86 specific nmi handling 2016-05-23 16:53:46 +02:00
xen xen: write information about supported backends 2016-05-23 13:30:03 +02:00
xenpv xen: add pvUSB backend 2016-05-23 13:30:03 +02:00
xtensa replace muldiv64(a, b, c) by (uint64_t)a * b / c 2016-06-07 18:02:49 +03:00
Makefile.objs Add a base IPMI interface 2015-12-22 18:39:19 +02:00