From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acr5b-00041J-9d for qemu-devel@nongnu.org; Mon, 07 Mar 2016 04:04:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acr5Y-0004hh-0F for qemu-devel@nongnu.org; Mon, 07 Mar 2016 04:04:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acr5X-0004hX-RK for qemu-devel@nongnu.org; Mon, 07 Mar 2016 04:04:27 -0500 Date: Mon, 7 Mar 2016 17:04:25 +0800 From: Fam Zheng Message-ID: <20160307090425.GA8919@ad.usersys.redhat.com> References: <1456813104-25902-1-git-send-email-famz@redhat.com> <56DD41A6.2040106@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56DD41A6.2040106@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 0/7] memory: Clean up MemoryRegion.ram_addr and optimize address_space_translate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: Paolo Bonzini , arei.gonglei@huawei.com, qemu-devel@nongnu.org, peterx@redhat.com, Janosch Frank On Mon, 03/07 09:53, Laszlo Ersek wrote: > (CC Janosch) > > Hi, > > On 03/01/16 07:18, Fam Zheng wrote: > > v2: In the optimization patch, factor out section_covers_addr() and use it. > > [Paolo, Peter] > > Check "ram_block == NULL" in patch 3. [Gonglei] > > Add Gonglei's rev-by in patches 1, 2, 4 and 5. > > > > The first four patches drop ram_addr from MemoryRegion on top of Gonglei's > > optimization. > > > > The next patch simplifies qemu_ram_free a bit by passing the RAMBlock pointer. > > > > The last patch speeds up address_space_translate with a cache pointer inside > > the AddressSpaceDispatch. > > > > Fam Zheng (7): > > exec: Return RAMBlock pointer from allocating functions > > memory: Move assignment to ram_block to memory_region_init_* > > memory: Implement memory_region_get_ram_addr with mr->ram_block > > memory: Drop MemoryRegion.ram_addr > > exec: Pass RAMBlock pointer to qemu_ram_free > > exec: Factor out section_covers_addr > > exec: Introduce AddressSpaceDispatch.mru_section > > > > cputlb.c | 4 +- > > exec.c | 106 +++++++++++++++++++++++++----------------------- > > hw/misc/ivshmem.c | 9 ++-- > > include/exec/memory.h | 9 +--- > > include/exec/ram_addr.h | 24 +++++------ > > kvm-all.c | 3 +- > > memory.c | 56 ++++++++++++++----------- > > 7 files changed, 111 insertions(+), 100 deletions(-) > > > > Does this series preserve "scripts/dump-guest-memory.py" in working > shape? One of the patch titles above says "Drop MemoryRegion.ram_addr", > and I think that might break the memory_region_get_ram_ptr() method. Indeed, the 'memory_region["ram_addr"]' expression is broken. I'll send a separate patch. Fam