From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36800 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgKC6-0006to-0J for qemu-devel@nongnu.org; Tue, 03 Aug 2010 12:18:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgKBx-0004AZ-Gy for qemu-devel@nongnu.org; Tue, 03 Aug 2010 12:18:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14319) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgKBx-00049p-AI for qemu-devel@nongnu.org; Tue, 03 Aug 2010 12:18:13 -0400 From: Alex Williamson In-Reply-To: <20100803121706.GN14448@mothafucka.localdomain> References: <20100802211121.5497.36512.stgit@localhost6.localdomain6> <20100803121706.GN14448@mothafucka.localdomain> Content-Type: text/plain; charset="UTF-8" Date: Tue, 03 Aug 2010 10:18:04 -0600 Message-ID: <1280852284.6598.89.camel@x201> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] e1000: Fix hotplug List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: qemu-devel@nongnu.org On Tue, 2010-08-03 at 08:17 -0400, Glauber Costa wrote: > On Mon, Aug 02, 2010 at 03:15:17PM -0600, Alex Williamson wrote: > > When we hotplug the device, > > we don't go through a reset cycle, which means a hot added e1000 is > > useless until the VM reboots. > > I do guess, however, that this is true for any device, right? > > Wouldn't it be better to just call the newly added reset function at > hotplug? One way to do that, would be to store a value indicated qemu > has already started. If you add a reset handler after that, the function > is called before being placed on the list. Yeah, that sounds like a better idea. We can actually do it quite easily from qdev_init using the hotplugged flag on the DeviceState. Drop this e1000 specific one, I'll send a new patch in a minute. Thanks, Alex