From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYZ9s-0007a3-R3 for qemu-devel@nongnu.org; Sat, 04 May 2013 05:53:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYZ9r-0005yY-Tr for qemu-devel@nongnu.org; Sat, 04 May 2013 05:53:36 -0400 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:45158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYZ9r-0005xU-Ll for qemu-devel@nongnu.org; Sat, 04 May 2013 05:53:35 -0400 Received: by mail-ea0-f176.google.com with SMTP id h14so1085449eak.21 for ; Sat, 04 May 2013 02:53:34 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5184DA9A.7050901@redhat.com> Date: Sat, 04 May 2013 11:53:30 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1367549122-2948-1-git-send-email-qemulist@gmail.com> In-Reply-To: <1367549122-2948-1-git-send-email-qemulist@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/6] proposal to make hostmem listener RAM unplug safe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: Peter Maydell , Anthony Liguori , Jan Kiszka , qemu-devel@nongnu.org, Vasilis Liaskovitis , Stefan Hajnoczi Il 03/05/2013 04:45, Liu Ping Fan ha scritto: > v1->v2: > 1.split RCU prepared style update and monitor the RAM-Device refcnt into two patches (patch 2,4) > 2.introduce AddrSpaceMem, which is similar to HostMem, but based on address space, while > the original HostMem only server system memory address space This looks suspiciously similar to FlatView, doesn't it? Perhaps the right thing to do is to add the appropriate locking and RCU-style updating to address_space_update_topology and memory_region_find. (And replacing flatview_destroy with ref/unref similar to HostMem in your patch 2). Then just switch dataplane to use memory_region_find... Paolo > Liu Ping Fan (6): > hostmem: make hostmem single, not per Vring related > hostmem: AddressSpace has its own map and maintained by RCU prepared > style > memory: add ref/unref interface for MemroyRegionOps > hostmem: hostmem listener pin RAM-Device by refcnt > Vring: use hostmem's RAM safe api > virtio-blk: release reference to RAM's memoryRegion > > exec.c | 1 + > hw/block/dataplane/virtio-blk.c | 52 ++++++++--- > hw/virtio/dataplane/hostmem.c | 168 +++++++++++++++++++++++++-------- > hw/virtio/dataplane/vring.c | 100 +++++++++++++++----- > include/exec/memory.h | 11 ++ > include/hw/virtio/dataplane/hostmem.h | 25 +++--- > include/hw/virtio/dataplane/vring.h | 5 +- > memory.c | 18 ++++ > 8 files changed, 289 insertions(+), 91 deletions(-) >