qemu-e2k/include/hw
Marcel Apfelbaum 4cae4d5aca hmp: fix regression of HMP device_del auto-completion
The commits:
 - 6a1fa9f5 (monitor: add del completion for peripheral device)
 - 66e56b13 (qdev: add qdev_build_hotpluggable_device_list helper)

cause a QEMU crash when trying to use HMP device_del auto-completion.
It can be easily reproduced by:
    <qemu-bin> -enable-kvm  ~/images/fedora.qcow2 -monitor stdio -device virtio-net-pci,id=vnet

    (qemu) device_del
    /home/mapfelba/git/upstream/qemu/hw/core/qdev.c:941:qdev_build_hotpluggable_device_list: Object 0x7f6ce04e4fe0 is not an instance of type device
    Aborted (core dumped)

The root cause is qdev_build_hotpluggable_device_list going recursively over
all peripherals and their children assuming all are devices. It doesn't work
since PCI devices have at least on child which is a memory region (bus master).

Solved by observing that all devices appear as direct children of
/machine/peripheral container. No need of going recursively
over all the children.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Reported-by: Gal Hammer <ghammer@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-id: 1417002601-20799-1-git-send-email-marcel.a@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-11-27 14:36:20 +00:00
..
acpi cpu-hotplug: rename function for better readability 2014-11-02 13:44:12 +02:00
arm
audio
block
char
cpu
cris
i2c
i386 -machine vmport=auto: Fix handling of VMWare ioport emulation for xen 2014-11-26 12:11:27 +01:00
input
intc
ipack
isa
kvm
lm32
m68k
mem pc: limit DIMM address and size to page aligned values 2014-11-23 12:11:30 +02:00
mips
misc
net
nvram
pci megasas: add MegaRAID SAS 2108 emulation 2014-10-31 11:29:00 +01:00
pci-host
ppc
s390x
scsi esp: Do not overwrite ESP_TCHI after reset 2014-11-12 10:27:03 +01:00
sh4
sparc
timer
tricore
unicore32
usb
virtio virtio-scsi: Fix comment for VirtIOSCSIReq 2014-11-12 12:43:45 +01:00
xen xen-hvm.c: Add support for Xen access to vmport 2014-10-30 14:16:38 +00:00
boards.h sysbus: Make devices spawnable via -device 2014-11-04 23:26:14 +01:00
bt.h
compat.h virtio-pci: fix migration for pci bus master 2014-11-02 12:03:03 +02:00
devices.h
elf_ops.h
empty_slot.h
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h irq: Remove qemu_irq_intercept_out 2014-10-23 16:41:25 +02:00
loader.h acpi-build: mark RAM dirty on table update 2014-11-24 20:57:10 +02:00
nmi.h
pcmcia.h hmp: Remove "info pcmcia" 2014-10-24 12:19:11 +01:00
platform-bus.h sysbus: Add new platform bus helper device 2014-11-04 23:26:14 +01:00
ptimer.h
qdev-core.h hmp: fix regression of HMP device_del auto-completion 2014-11-27 14:36:20 +00:00
qdev-dma.h
qdev-properties.h
qdev.h
sd.h
ssi.h
stream.h
sysbus.h trivial patches for 2014-11-11 2014-11-11 14:50:10 +00:00
usb.h