qemu-patch-raspberry4/include
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
..
block trivial patches for 2014-11-11 2014-11-11 14:50:10 +00:00
disas
exec memory: expose alignment used for allocating RAM as MemoryRegion API 2014-11-23 12:11:30 +02:00
fpu
hw hmp: fix regression of HMP device_del auto-completion 2014-11-27 14:36:20 +00:00
libdecnumber
migration
monitor block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
net
qapi
qemu memory: expose alignment used for allocating RAM as MemoryRegion API 2014-11-23 12:11:30 +02:00
qom
sysemu pc: kvm: check if KVM has free memory slots to avoid abort() 2014-11-23 12:11:29 +02:00
ui
config.h
elf.h
glib-compat.h
qemu-common.h pidfile: stop making pidfile error a special case 2014-11-02 10:04:34 +03:00
qemu-io.h
trace-tcg.h
trace.h