Received: from eggs.gnu.org ([2001:4830:134:3::10]:48863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5qzH-0005lc-TT for qemu-devel@nongnu.org; Thu, 26 May 2016 04:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5qzE-0007Jf-Pa for qemu-devel@nongnu.org; Thu, 26 May 2016 04:49:51 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:36947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5qzE-0007J9-Hi for qemu-devel@nongnu.org; Thu, 26 May 2016 04:49:48 -0400 Received: by mail-wm0-x231.google.com with SMTP id z87so90357298wmh.0 for ; Thu, 26 May 2016 01:49:48 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 26 May 2016 10:49:40 +0200 Message-Id: <1464252584-30832-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/4] More cleanups for RAMBlock/ram_addr_t vs. MemoryRegion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: arei.gonglei@huawei.com, mst@redhat.com, famz@redhat.com, marcandre.lureau@redhat.com This removes some more cases where we unnecessarily go through ram_addr_t. Now that MemoryRegions have a RAMBlock pointer, it is possible to keep reasoning in terms of MemoryRegion+offset everywhere, except when managing dirty bitmaps and TCG TLB entries. ram_addr.h is now included only by cputlb.c, exec.c, kvm-all.c (for dirty bitmaps), memory.c and migration/ram.c (also for dirty bitmaps). The diffstat is lying, because some of the insertions actually come from doc comments. :) Paolo Paolo Bonzini (4): memory: remove qemu_get_ram_fd, qemu_set_ram_fd, qemu_ram_block_host_ptr exec: remove ram_addr argument from qemu_ram_block_from_host memory: split memory_region_from_host from qemu_ram_addr_from_host exec: hide mr->ram_addr from qemu_get_ram_ptr users cputlb.c | 3 +- exec.c | 110 +++++++++++++------------------------------ hw/misc/ivshmem.c | 5 +- hw/virtio/vhost-user.c | 25 +++++----- include/exec/cpu-common.h | 4 +- include/exec/memory.h | 36 ++++++++++++-- include/exec/ram_addr.h | 3 -- memory.c | 39 +++++++++++---- migration/postcopy-ram.c | 3 +- scripts/dump-guest-memory.py | 19 ++------ target-i386/kvm.c | 6 ++- 11 files changed, 122 insertions(+), 131 deletions(-) -- 2.5.5