From patchwork Tue May 7 14:16:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 242349 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0A1E42C00F0 for ; Wed, 8 May 2013 01:15:11 +1000 (EST) Received: from localhost ([::1]:53632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZitF-0002Z2-AM for incoming@patchwork.ozlabs.org; Tue, 07 May 2013 10:29:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZip0-0007IK-5d for qemu-devel@nongnu.org; Tue, 07 May 2013 10:24:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZioy-0008NB-KN for qemu-devel@nongnu.org; Tue, 07 May 2013 10:24:49 -0400 Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]:49514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZiiG-0005oV-W0 for qemu-devel@nongnu.org; Tue, 07 May 2013 10:17:53 -0400 Received: by mail-wg0-f51.google.com with SMTP id b13so650426wgh.6 for ; Tue, 07 May 2013 07:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=VS408A5K8T3JRy3hg0NTCyixrTB4YHBnnweZjlD9TVU=; b=gdooGCHa2kBXZwCEWOXQznHnUe+jnr4Zo6WsaNAzGV0S58miM5QUuuDfCNTsZvDft9 g+R2adIh1ozys2p8Me2RT0fjT3VhsBEdQ4TIwHDMRHUaAkblCSOB+YxeferMmxG9sTFH /SjgzJVRLIiuvPfpUuubCUgedtJ0jjmxG7fsmh7YtL6PLoyNIl2uvWNCH82TD5MDPLW6 +FJXGt+43vXzlerK/YnvA3aEtZVgmBAf/l3PgCv/yBVaPIHTq5MwVq12Ywxo83CZ0tDd Q9gq7RfsG+DZHTIHYsUgGEthKNcMwrzfj2+W4P8Yp+PbxELAh/7g3fnLCG1WnHD2bYqN otrQ== X-Received: by 10.194.8.7 with SMTP id n7mr3751429wja.55.1367936272241; Tue, 07 May 2013 07:17:52 -0700 (PDT) Received: from localhost.localdomain (93-34-176-20.ip50.fastwebnet.it. [93.34.176.20]) by mx.google.com with ESMTPSA id ge7sm3335978wib.6.2013.05.07.07.17.50 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 07 May 2013 07:17:51 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 7 May 2013 16:16:44 +0200 Message-Id: <1367936238-12196-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1367936238-12196-1-git-send-email-pbonzini@redhat.com> References: <1367936238-12196-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::233 Cc: aik@ozlabs.ru, jan.kiszka@siemens.com, qemulist@gmail.com, stefanha@redhat.com, david@gibson.dropbear.id.au Subject: [Qemu-devel] [PATCH 06/40] memory: make memory_global_sync_dirty_bitmap take an AddressSpace X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 f65acfd..489dc73 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -757,13 +757,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 a6e9bc5..7a956a0 100644 --- a/memory.c +++ b/memory.c @@ -1486,9 +1486,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) {