From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLxuQ-0001g7-GW for qemu-devel@nongnu.org; Tue, 17 Sep 2013 12:13:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLxuI-00075v-Ut for qemu-devel@nongnu.org; Tue, 17 Sep 2013 12:13:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLxuI-00075o-Ma for qemu-devel@nongnu.org; Tue, 17 Sep 2013 12:13:42 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8HGDfWJ011307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 Sep 2013 12:13:41 -0400 Message-ID: <52387FBF.4050504@redhat.com> Date: Tue, 17 Sep 2013 18:13:51 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> <20130917124724.GA18965@redhat.com> <52386A29.9090908@redhat.com> <20130917144541.GA19882@redhat.com> <52387840.8090405@redhat.com> <20130917155909.GA20460@redhat.com> In-Reply-To: <20130917155909.GA20460@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 00/38] Delay destruction of memory regions to instance_finalize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org Il 17/09/2013 17:59, Michael S. Tsirkin ha scritto: > Yes but just not freeing it is unlikely to be enough. > We need to make sure data structures are consistent. > So this really needs to be done carefully, device by device. Of course. I checked SCSI already and it's sane. >>>> - del_vm_change_state_handler >> >> Same here: user can stop/cont between exit and finalize, for example >> because the I/O failed. > > Device that is not guest visible is very unlikely to > care about whether guest is running. Most devices do not care at all whether the guest is running. :) If they do, they usually just use vm_clock. But retrying failed I/O uses qemu_add_vm_change_set_handler, and that has to be done even after the device is not guest visible anymore. BTW, qemu_del_nic is another one that I forgot to mention. You could have MMIO that triggers a transmit while the device is going down, for example. Paolo