From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLwV6-0000RE-DV for qemu-devel@nongnu.org; Tue, 17 Sep 2013 10:43:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLwV0-0002Wv-9c for qemu-devel@nongnu.org; Tue, 17 Sep 2013 10:43:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLwV0-0002Wp-2A for qemu-devel@nongnu.org; Tue, 17 Sep 2013 10:43:30 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8HEhTF3015098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 Sep 2013 10:43:29 -0400 Date: Tue, 17 Sep 2013 17:45:41 +0300 From: "Michael S. Tsirkin" Message-ID: <20130917144541.GA19882@redhat.com> References: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> <20130917124724.GA18965@redhat.com> <52386A29.9090908@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52386A29.9090908@redhat.com> 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: Paolo Bonzini Cc: qemu-devel@nongnu.org On Tue, Sep 17, 2013 at 04:41:45PM +0200, Paolo Bonzini wrote: > 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 What's the problem here exactly? > - other dynamically allocated data And here? I don't think we should move rundom stuff out to finalize just because we can. > - del_vm_change_state_handler > > - MSI-X > > - SHPC, AER and other PCI/bridge stuff > > Paolo Let's document specific problems and fix them. Randomly moving cleanup order has a high chance to introduce bugs.