qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Greg Kurz <gkurz@linux.vnet.ibm.com>,
	David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] spapr_rng: disable hotpluggability
Date: Thu, 25 Feb 2016 12:27:48 +0100	[thread overview]
Message-ID: <56CEE534.2070802@redhat.com> (raw)
In-Reply-To: <20160225110800.23227.19534.stgit@bahia.huguette.org>

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 <gkurz@linux.vnet.ibm.com>
> ---
>  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 <thuth@redhat.com>

  reply	other threads:[~2016-02-25 11:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 11:08 [Qemu-devel] [PATCH] spapr_rng: disable hotpluggability Greg Kurz
2016-02-25 11:27 ` Thomas Huth [this message]
2016-02-25 11:49   ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56CEE534.2070802@redhat.com \
    --to=thuth@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=gkurz@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).