From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLwTG-0007wl-NJ for qemu-devel@nongnu.org; Tue, 17 Sep 2013 10:41:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLwTA-0001w3-4L for qemu-devel@nongnu.org; Tue, 17 Sep 2013 10:41:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLwT9-0001vp-SD for qemu-devel@nongnu.org; Tue, 17 Sep 2013 10:41:36 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8HEfYdu021375 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 Sep 2013 10:41:34 -0400 Message-ID: <52386A29.9090908@redhat.com> Date: Tue, 17 Sep 2013 16:41:45 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> <20130917124724.GA18965@redhat.com> In-Reply-To: <20130917124724.GA18965@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 14:47, Michael S. Tsirkin ha scritto: > Ergo, to make sure a referenced MR does not get > destroyed, we must make sure only finalize > calls memory_region_destroy. > > So I think this patchset should do exactly that, > not try to move out more stuff to finalize. Yes, this is the part of the problem that applies to all devices. Some devices may have timers or other dynamically-allocated data that may be used between exit and finalize. The same applies to capabilities such as MSI and MSI-X. All this must also be moved to finalize, but this can be done in separate patches. I'll separate the series as follows: - memory_region_destroy - unregister_savevm - other dynamically allocated data - del_vm_change_state_handler - MSI-X - SHPC, AER and other PCI/bridge stuff Paolo