[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] hw/core/qdev: Do not allow hot-plugging without
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] hw/core/qdev: Do not allow hot-plugging without hotplug controller |
Date: |
Wed, 13 Sep 2017 11:58:53 +0100 |
On 7 September 2017 at 10:22, Thomas Huth <address@hidden> 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
Re: [Qemu-devel] [PATCH] hw/core/qdev: Do not allow hot-plugging without hotplug controller,
Peter Maydell <=
Re: [Qemu-devel] [PATCH] hw/core/qdev: Do not allow hot-plugging without hotplug controller, Eduardo Habkost, 2017/09/21