From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLysm-0002dD-JF for qemu-devel@nongnu.org; Tue, 17 Sep 2013 13:16:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLysg-0002bj-9M for qemu-devel@nongnu.org; Tue, 17 Sep 2013 13:16:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLysg-0002bQ-1R for qemu-devel@nongnu.org; Tue, 17 Sep 2013 13:16:06 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8HHG5ho002654 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 Sep 2013 13:16:05 -0400 Message-ID: <52388E5F.6020802@redhat.com> Date: Tue, 17 Sep 2013 19:16:15 +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> <52387FBF.4050504@redhat.com> <20130917162928.GA20672@redhat.com> <52388A3D.4090909@redhat.com> <20130917170752.GA20986@redhat.com> In-Reply-To: <20130917170752.GA20986@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 19:07, Michael S. Tsirkin ha scritto: > After memory_region_del_subregion returns, > it's a promise that there will not be accesses > to the region. It's racy anyway. You can have memory_region_del_subregion happen one clock cycle after the other (physical) CPU has done checked that there will not be accesses to the region. A real bus has a "big PCI lock" (there can be only one transaction at a time), which is exactly what we want to get rid of. > So I'm not even sure we really need to move destroy to finalize anymore ... We definitely need to move it. Even if we added a flag that we set in memory_region_del_subregion, we need to check it later when AIO completes. Paolo