From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYuPB-0002yS-JE for qemu-devel@nongnu.org; Thu, 25 Feb 2016 06:48:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYuP7-0003uY-JK for qemu-devel@nongnu.org; Thu, 25 Feb 2016 06:48:25 -0500 Date: Thu, 25 Feb 2016 22:49:18 +1100 From: David Gibson Message-ID: <20160225114918.GB20657@voom.fritz.box> References: <20160225110800.23227.19534.stgit@bahia.huguette.org> <56CEE534.2070802@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s2ZSL+KKDSLx8OML" Content-Disposition: inline In-Reply-To: <56CEE534.2070802@redhat.com> Subject: Re: [Qemu-devel] [PATCH] spapr_rng: disable hotpluggability List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Greg Kurz --s2ZSL+KKDSLx8OML Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 25, 2016 at 12:27:48PM +0100, Thomas Huth wrote: > 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: > >=20 > > ERROR:hw/core/qdev.c:295:qdev_unplug: assertion failed: (hotplug_ctrl) > > Aborted > >=20 > > 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. > >=20 > > And anyway, it doesn't make much sense to unplug this device since hcal= ls > > cannot be unregistered. Even the idea of hotplugging a RNG device inste= ad > > of declaring it on the QEMU command line looks weird. > >=20 > > This patch simply disables hotpluggability for the spapr-rng class. > >=20 > > Signed-off-by: Greg Kurz > > --- > > hw/ppc/spapr_rng.c | 1 + > > 1 file changed, 1 insertion(+) > >=20 > > 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, v= oid *data) > > dc->realize =3D spapr_rng_realize; > > set_bit(DEVICE_CATEGORY_MISC, dc->categories); > > dc->props =3D spapr_rng_properties; > > + dc->hotpluggable =3D false; > > } >=20 > That makes sense! >=20 > Reviewed-by: Thomas Huth Indeed. Merged to ppc-for-2.6, thanks. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --s2ZSL+KKDSLx8OML Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWzuo+AAoJEGw4ysog2bOSkP8P/3A4SgPmxQ8sm7zwvPGXJPDs 9QyjFaryu/0YQGZzdBI8lMGGEroo1JduKdnpKltdWUlO8eHX9lPJahPmcvkCd+0d avvYyFAITo8XrDfANqQQ7Q7h6ffQnkIvpBTrT1E2PSZNQFMxxERuzkW2KE814gqd wjRmmsr3sLasU6s6lKU+cm+0sDfND75pyhk7mGWPKZwN/0X3TDbCXI5bZ1tPu7/1 da+oIr91Qdw+K6ISa4mU9ptB6OhvHnM7knxY8JeOZdwjDpek/eWuBbQ/5jIOMfIu +GOlnNPFlg7Wsn/rkZkrJrcBoQD01/gwMFZMH4qPZqA36Fww1mJ8bsCXr+ss6yVb w+QIOjZ+K0WbXaUjd+sV/cS3xbbCk9/WVk8JpB7D7zZ1Rv4uc5TmQ9LMPlaMyiEe 4W1CoFbAH3AD3NGH4AR+AeD1XMLkV9+Ab9zH0j1ri2LxicbYno3n14XBMNKCv/lI 9+5d2Qm7jIgTjfLTfI2spKbznQ++5yQYl2fUoE2JlQ4HiKKHEzv0Si8FD9LJ1XYm AvkhYC3qnNxagWVU3XYhv64mcut8O3HpcIwVPFk/L4PcWoSThhhKIn60aWY5Yntu 0L0qccFKnfuXb4nvoB+kY5kXLRpWtwcSLBij/5X2HzuiEDTHmC65+pM2dDf6CDwt /TNqjrkbI7+7OnNibGn6 =GGwB -----END PGP SIGNATURE----- --s2ZSL+KKDSLx8OML--