From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMCN0-0006ZK-CD for qemu-devel@nongnu.org; Wed, 18 Sep 2013 03:40:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMCMq-0001GD-Mt for qemu-devel@nongnu.org; Wed, 18 Sep 2013 03:40:18 -0400 Received: from mail-qc0-x230.google.com ([2607:f8b0:400d:c01::230]:40706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMCMq-0001G9-Io for qemu-devel@nongnu.org; Wed, 18 Sep 2013 03:40:08 -0400 Received: by mail-qc0-f176.google.com with SMTP id t7so4354508qcv.35 for ; Wed, 18 Sep 2013 00:40:08 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <523958E3.6020906@redhat.com> Date: Wed, 18 Sep 2013 09:40:19 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20130917155909.GA20460@redhat.com> <52387FBF.4050504@redhat.com> <20130917162928.GA20672@redhat.com> <52388A3D.4090909@redhat.com> <20130917170752.GA20986@redhat.com> <52388E5F.6020802@redhat.com> <20130917172627.GA21064@redhat.com> <5238A859.9040705@redhat.com> <20130917195123.GB21419@redhat.com> <5238D18B.6020901@redhat.com> <20130918054848.GB23532@redhat.com> In-Reply-To: <20130918054848.GB23532@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 18/09/2013 07:48, Michael S. Tsirkin ha scritto: > So I think the fix is actually obeying ordering rules, > that is know that write is in progress > and flush on read. I think this can be modeled as a generic, synchronous (*busmaster_cancel)(PCIDevice*) callback, that is called after bus master is turned off. You don't even really have to wait for a read. > I think moving memory region destroy out to finalize makes sense > irrespectively, as long as destroy is made idempotent so we can simply > destroy everything without worrying whether we initialized it. > > The rest of the changes will be harder, we'll have to do > them carefully on a case by case basis. Good, we are in agreement then. Paolo