Skip to contentSkip to conversation

Regression: cold plug with device_add fails assertion

Qemu-devel Markus Armbruster 2 participants 3 messages Dec 21, 2011 – Jan 2, 2012

lore
Share & tools
lore
#0 lore raw

Test case:

$ echo -e 'device_add usb-mouse\nq' | qemu-system-x86_64 -vnc :0 -monitor stdio -usb

Works in v1.0, doesn't work in master's commit ab0115e1:

qemu-system-x86_64: /work/armbru/qemu/hw/qdev.c:97: qdev_create_from_info: Assertion `bus->allow_hotplug' failed.

Same for virtio-blk-pci, so it's not specific to USB.

git-bisect:

8eb02831af6c5534d8712cb8db1104852cac26e9 is the first bad commit commit 8eb02831af6c5534d8712cb8db1104852cac26e9

Author: Anthony Liguori <[email protected]>
Date:   Mon Dec 12 14:29:37 2011 -0600

dev: add an anonymous peripheral container

#1 lore raw
Quoted 9 lines · Markus Armbruster

Test case:

$ echo -e 'device_add usb-mouse\nq' | qemu-system-x86_64 -vnc :0 -monitor stdio -usb

Works in v1.0, doesn't work in master's commit ab0115e1:

qemu-system-x86_64: /work/armbru/qemu/hw/qdev.c:97: qdev_create_from_info: Assertion `bus->allow_hotplug' failed.

Same for virtio-blk-pci, so it's not specific to USB.

Yes, see:

http://mid.gmane.org/[email protected]

Which is in the latest qemu.git.

I also added a test to qemu-test to catch this.

Regards,

Anthony Liguori

Quoted 12 lines

git-bisect:

8eb02831af6c5534d8712cb8db1104852cac26e9 is the first bad commit commit 8eb02831af6c5534d8712cb8db1104852cac26e9

Author: Anthony Liguori<[email protected]>
Date:   Mon Dec 12 14:29:37 2011 -0600

dev: add an anonymous peripheral container

#2 lore raw
Quoted 11 lines · Anthony Liguori
Quoted 9 lines · Markus Armbruster

Test case:

$ echo -e 'device_add usb-mouse\nq' | qemu-system-x86_64 -vnc :0 -monitor stdio -usb

Works in v1.0, doesn't work in master's commit ab0115e1:

qemu-system-x86_64: /work/armbru/qemu/hw/qdev.c:97: qdev_create_from_info: Assertion `bus->allow_hotplug' failed.

Same for virtio-blk-pci, so it's not specific to USB.

Quoted 7 lines

Yes, see:

http://mid.gmane.org/[email protected]

Which is in the latest qemu.git.

I also added a test to qemu-test to catch this.

I verified this is fixed on current master. Thanks!