From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfvP3-00026t-Jf for qemu-devel@nongnu.org; Fri, 24 May 2013 13:03:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfvOy-00016B-MA for qemu-devel@nongnu.org; Fri, 24 May 2013 13:03:41 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:61222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfvOy-00015r-GA for qemu-devel@nongnu.org; Fri, 24 May 2013 13:03:36 -0400 Received: by mail-ee0-f45.google.com with SMTP id l10so2857982eei.32 for ; Fri, 24 May 2013 10:03:35 -0700 (PDT) Received: from playground.lan (net-37-117-138-128.cust.dsl.vodafone.it. [37.117.138.128]) by mx.google.com with ESMTPSA id z52sm24872219eea.1.2013.05.24.10.03.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 24 May 2013 10:03:34 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 24 May 2013 19:03:02 +0200 Message-Id: <1369414987-8839-11-git-send-email-pbonzini@redhat.com> In-Reply-To: <1369414987-8839-1-git-send-email-pbonzini@redhat.com> References: <1369414987-8839-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 10/15] memory: make memory_global_sync_dirty_bitmap take an AddressSpace List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Since this is a MemoryListener operation, it only makes sense on an AddressSpace granularity. Suggested-by: Peter Maydell Signed-off-by: Paolo Bonzini --- arch_init.c | 2 +- include/exec/memory.h | 7 +++---- memory.c | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 49c5dc2..5d32ecf 100644 --- a/arch_init.c +++ b/arch_init.c @@ -386,7 +386,7 @@ static void migration_bitmap_sync(void) } trace_migration_bitmap_sync_start(); - memory_global_sync_dirty_bitmap(get_system_memory()); + address_space_sync_dirty_bitmap(&address_space_memory); QTAILQ_FOREACH(block, &ram_list.blocks, next) { for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) { diff --git a/include/exec/memory.h b/include/exec/memory.h index e1208e4..91be2a3 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -766,13 +766,12 @@ memory_region_section_addr(MemoryRegionSection *section, } /** - * memory_global_sync_dirty_bitmap: synchronize the dirty log for all memory + * address_space_sync_dirty_bitmap: synchronize the dirty log for all memory * * Synchronizes the dirty page log for an entire address space. - * @address_space: a top-level (i.e. parentless) region that contains the - * memory being synchronized + * @as: the address space that contains the memory being synchronized */ -void memory_global_sync_dirty_bitmap(MemoryRegion *address_space); +void address_space_sync_dirty_bitmap(AddressSpace *as); /** * memory_region_transaction_begin: Start a transaction. diff --git a/memory.c b/memory.c index 5431463..11bbeb7 100644 --- a/memory.c +++ b/memory.c @@ -1485,9 +1485,8 @@ MemoryRegionSection memory_region_find(MemoryRegion *mr, return ret; } -void memory_global_sync_dirty_bitmap(MemoryRegion *address_space) +void address_space_sync_dirty_bitmap(AddressSpace *as) { - AddressSpace *as = memory_region_to_address_space(address_space); FlatRange *fr; FOR_EACH_FLAT_RANGE(fr, as->current_map) { -- 1.8.1.4