From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQfi6-0006s5-Uo for qemu-devel@nongnu.org; Thu, 20 Mar 2014 12:20:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQfi0-0005LY-Tx for qemu-devel@nongnu.org; Thu, 20 Mar 2014 12:20:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQfi0-0005LR-IO for qemu-devel@nongnu.org; Thu, 20 Mar 2014 12:20:44 -0400 Date: Thu, 20 Mar 2014 17:20:32 +0100 From: Igor Mammedov Message-ID: <20140320172032.796a2974@nial.usersys.redhat.com> In-Reply-To: <532B1361.9070006@redhat.com> References: <1395327676-29753-1-git-send-email-imammedo@redhat.com> <1395327676-29753-5-git-send-email-imammedo@redhat.com> <532B1361.9070006@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 4/8] qdev: link based hotplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: mst@redhat.com, marcel.a@redhat.com, qemu-devel@nongnu.org, vasilis.liaskovitis@profitbricks.com, aliguori@amazon.com, afaerber@suse.de On Thu, 20 Mar 2014 17:12:17 +0100 Paolo Bonzini wrote: > Il 20/03/2014 16:01, Igor Mammedov ha scritto: > > + /* > > + * Returns path to link<> that should be set/unset on dev hotplug. > > + * Used for link based bussless devices hotplug. > > + */ > > + char* (*hotplug_path)(DeviceState *dev); > > + > > What about just looking up on the QOM tree until you find a > HotplugHandler, if the device doesn't have a bus or the bus doesn't have > a hotplug handler link itself? This is similar to how FWPathProvider works. it does so "hotplug_handler_get_from_path()", above just provides option to specify lookup path. See 6/8 where PC board allocates links and sets its own board specific path for generic DimmDevice. > > Paolo