[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 1/8] spapr_rng: disable hotpluggability
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 1/8] spapr_rng: disable hotpluggability |
Date: |
Mon, 29 Feb 2016 17:58:24 +1100 |
From: Greg Kurz <address@hidden>
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 <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
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
- [Qemu-ppc] [PULL 0/8] ppc-for-2.6 queue 20160229, David Gibson, 2016/02/29
- [Qemu-ppc] [PULL 1/8] spapr_rng: disable hotpluggability,
David Gibson <=
- [Qemu-ppc] [PULL 4/8] spapr: disable vmdesc submission for old machines, David Gibson, 2016/02/29
- [Qemu-ppc] [PULL 7/8] migration: allow machine to enforce configuration section migration, David Gibson, 2016/02/29
- [Qemu-ppc] [PULL 3/8] spapr_pci: fix irq leak in RTAS ibm, change-msi, David Gibson, 2016/02/29
- [Qemu-ppc] [PULL 8/8] xics: report errors with the QEMU Error API, David Gibson, 2016/02/29
- [Qemu-ppc] [PULL 2/8] spapr_pci: kill useless variable in rtas_ibm_change_msi(), David Gibson, 2016/02/29
- [Qemu-ppc] [PULL 5/8] dbdma: warn when using unassigned channel, David Gibson, 2016/02/29
- [Qemu-ppc] [PULL 6/8] spapr: skip configuration section during migration of older machines, David Gibson, 2016/02/29
- Re: [Qemu-ppc] [PULL 0/8] ppc-for-2.6 queue 20160229, Peter Maydell, 2016/02/29