On 7 September 2017 at 10:22, Thomas Huth <th...@redhat.com> wrote: > qdev_unplug() bails out with an assertion if the user tries to device_del > a hot-plugged device that does not have a hotplug controller. Unfortunately, > our devices are all marked with hotpluggable = true by default (see the > device_class_init() function in qdev.c), so it currently can happen that > the user runs into this situation and QEMU gets terminated unexpectedly:
Why are our devices hotpluggable by default? Hotpluggable is the unusual case which requires the device author to take special case (notably writing a function to undo anything done in realize so we don't leak stuff on unplug), so it should be the case that requires the device author to mark the device as hotplugged specifically. We should just change the default (and effectively whitelist devices which do hotplug successfully), or we'll be continually playing whack-a-mole with devices or classes of devices or machines that accidentally forgot to disable hotplugging. thanks -- PMM