From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaHlw-0003jU-Cx for qemu-devel@nongnu.org; Mon, 29 Feb 2016 01:57:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaHlt-0003fM-57 for qemu-devel@nongnu.org; Mon, 29 Feb 2016 01:57:36 -0500 From: David Gibson Date: Mon, 29 Feb 2016 17:58:24 +1100 Message-Id: <1456729111-16797-2-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1456729111-16797-1-git-send-email-david@gibson.dropbear.id.au> References: <1456729111-16797-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PULL 1/8] spapr_rng: disable hotpluggability List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, David Gibson , Greg Kurz From: Greg Kurz It is currently possible to hotplug a spapr_rng device but QEMU crashes when we try to hot unplug: ERROR:hw/core/qdev.c:295:qdev_unplug: assertion failed: (hotplug_ctrl) Aborted This happens because spapr_rng isn't plugged to any bus and sPAPR does not provide hotplug support for it: qdev_get_hotplug_handler() hence return NULL and we hit the assertion. And anyway, it doesn't make much sense to unplug this device since hcalls cannot be unregistered. Even the idea of hotplugging a RNG device instead of declaring it on the QEMU command line looks weird. This patch simply disables hotpluggability for the spapr-rng class. Signed-off-by: Greg Kurz Reviewed-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/spapr_rng.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c index 8484fcf..a39d472 100644 --- a/hw/ppc/spapr_rng.c +++ b/hw/ppc/spapr_rng.c @@ -170,6 +170,7 @@ static void spapr_rng_class_init(ObjectClass *oc, void *data) dc->realize = spapr_rng_realize; set_bit(DEVICE_CATEGORY_MISC, dc->categories); dc->props = spapr_rng_properties; + dc->hotpluggable = false; } static const TypeInfo spapr_rng_info = { -- 2.5.0