On 26 November 2014 at 11:50, Marcel Apfelbaum <marce...@redhat.com> wrote:
> 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 <marce...@redhat.com>

Applied, thanks.

-- PMM

Reply via email to