From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYYiM-0005UC-Rx for qemu-devel@nongnu.org; Mon, 29 Sep 2014 07:02:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYYiD-00051E-Rt for qemu-devel@nongnu.org; Mon, 29 Sep 2014 07:01:58 -0400 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:41246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYYiD-00050j-KL for qemu-devel@nongnu.org; Mon, 29 Sep 2014 07:01:49 -0400 Received: by mail-wg0-f48.google.com with SMTP id l18so196286wgh.19 for ; Mon, 29 Sep 2014 04:01:43 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <54293C11.40700@redhat.com> Date: Mon, 29 Sep 2014 13:01:37 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1411723721-20484-1-git-send-email-imammedo@redhat.com> <1411723721-20484-19-git-send-email-imammedo@redhat.com> In-Reply-To: <1411723721-20484-19-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 18/36] qdev: drop hotplug check from bus_add_child() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , qemu-devel@nongnu.org Cc: dmitry@daynix.com, borntraeger@de.ibm.com, mst@redhat.com, agraf@suse.de, amit.shah@redhat.com, kraxel@redhat.com, cornelia.huck@de.ibm.com, rth@twiddle.net Il 26/09/2014 11:28, Igor Mammedov ha scritto: > check is too restrictive and does not allow > to add childs to just created bus during hotplug > when the bus is part of composite device. > > Removing check from bus_add_child() doesn't affect > devices creatable with device_add/del commands since > they have a similar builtin checks and patch will > allow to create complex composite devices during > hotplug. > > Signed-off-by: Igor Mammedov > --- > hw/core/qdev.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/hw/core/qdev.c b/hw/core/qdev.c > index 0de99b2..fa86843 100644 > --- a/hw/core/qdev.c > +++ b/hw/core/qdev.c > @@ -85,10 +85,6 @@ static void bus_add_child(BusState *bus, DeviceState *child) > char name[32]; > BusChild *kid = g_malloc0(sizeof(*kid)); > > - if (qdev_hotplug) { > - assert(qbus_is_hotpluggable(bus)); > - } > - > kid->index = bus->max_index++; > kid->child = child; > object_ref(OBJECT(kid->child)); > Reviewed-by: Paolo Bonzini