[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] spapr_rng: disable hotpluggability
From: |
Thomas Huth |
Subject: |
Re: [Qemu-ppc] [PATCH] spapr_rng: disable hotpluggability |
Date: |
Thu, 25 Feb 2016 12:27:48 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 25.02.2016 12:08, Greg Kurz wrote:
> 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>
> ---
> 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 8484fcf54774..a39d472b66fd 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;
> }
That makes sense!
Reviewed-by: Thomas Huth <address@hidden>