From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAQI8-0002Yc-4n for qemu-devel@nongnu.org; Mon, 03 Feb 2014 15:38:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAQI3-0001x8-7P for qemu-devel@nongnu.org; Mon, 03 Feb 2014 15:38:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAQI2-0001x4-TA for qemu-devel@nongnu.org; Mon, 03 Feb 2014 15:38:47 -0500 Date: Mon, 3 Feb 2014 21:38:28 +0100 From: Igor Mammedov Message-ID: <20140203213828.38f1fac6@thinkpad> In-Reply-To: <52EFEE3C.10608@redhat.com> References: <1391443030-8662-1-git-send-email-imammedo@redhat.com> <1391443030-8662-3-git-send-email-imammedo@redhat.com> <52EFEE3C.10608@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 2/9] qdev: add to BusState "hotplug-handler" link List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, stefanha@redhat.com, mst@redhat.com, jan.kiszka@siemens.com, marcel.a@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, blauwirbel@gmail.com, alex.williamson@redhat.com, kraxel@redhat.com, aliguori@amazon.com, pbonzini@redhat.com, afaerber@suse.de On Mon, 03 Feb 2014 12:30:04 -0700 Eric Blake wrote: > On 02/03/2014 08:57 AM, Igor Mammedov wrote: > > It will allow to reuse field with different BUSes, > > reducing code duplication. Field is intended for > > replacing 'hotplug_qdev' field in PCIBus and also > > will allow to avoid adding equivalent field to > > DimmBus with possiblitity to refactor other BUSes > > to use it instead of custom field. > > In addition once all users of allow_hotplug field > > are converted to new API, link could replace > > allow_hotplug field in qdev hotplug code. > > > > > +static inline void qbus_set_hotplug_handler(BusState *bus, DeviceState *handler, > > + Error **errp) > > +{ > > + object_property_set_link(OBJECT(bus), OBJECT(handler), > > + QDEV_HOTPLUG_HANDLER_PROPERTY, errp); > > + bus->allow_hotplug = 1; > > Should we convert allow_hotplug to bool over the course of this series? There isn't much point in touching it, since it's going to be removed once all hotplug-able buses are converted to new interface. > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > -- Regards, Igor