From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6zUm-00011f-Aw for qemu-devel@nongnu.org; Thu, 10 Dec 2015 06:34:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6zUh-0000k4-Ge for qemu-devel@nongnu.org; Thu, 10 Dec 2015 06:34:48 -0500 Received: from e06smtp09.uk.ibm.com ([195.75.94.105]:54913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6zUh-0000jX-8S for qemu-devel@nongnu.org; Thu, 10 Dec 2015 06:34:43 -0500 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 10 Dec 2015 11:34:41 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id B8A3D219005C for ; Thu, 10 Dec 2015 11:34:29 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tBABYb4E9765306 for ; Thu, 10 Dec 2015 11:34:37 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tBABYaqL020285 for ; Thu, 10 Dec 2015 04:34:37 -0700 Date: Thu, 10 Dec 2015 12:34:33 +0100 From: Greg Kurz Message-ID: <20151210123433.7b2ee545@bahia.local> In-Reply-To: References: <20151208155457.27775.69441.stgit@bahia.huguette.org> <20151208181746-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.5] virtio-9p-device: add minimal unrealize handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "Aneesh Kumar K.V" , QEMU Developers , "Michael S. Tsirkin" On Thu, 10 Dec 2015 11:17:09 +0000 Peter Maydell wrote: > On 8 December 2015 at 16:19, Michael S. Tsirkin wrote: > > On Tue, Dec 08, 2015 at 04:54:57PM +0100, Greg Kurz wrote: > >> Since commit 4652f1640e029e1f2433fa77ba6af285 "virtio-9p: add savevm handlers", > >> if the user hot-unplugs a quiescent 9p device and live migrates, the source > >> QEMU crashes before migration completetion... This happens because virtio-9p > >> devices have a realize handler which calls virtio_init() and register_savevm(). > >> Both calls store pointers to the device internals, that get dereferenced during > >> migration even if the device got unplugged. > >> > >> This patch simply adds an unrealize handler to perform minimal cleanup and > >> avoid the crash. Hot unplug of non-quiescent 9p devices is still not supported > >> in QEMU, and not supported by linux guests either. > >> > >> Signed-off-by: Greg Kurz > > > > Reviewed-by: Michael S. Tsirkin > > Applied to master, thanks. (I wrapped the lines in the commit message > which were a bit too long; wrap at 75 chars or so is recommended so > that when you read the commit via 'git log' on an 80 column terminal > they still fit.) > > thanks > -- PMM > Oops my bad. I'll :set textwidth accordingly for my future posts. Thanks. -- Greg