From patchwork Tue Mar 23 16:53:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 87698 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2NGtHgV012894 for ; Tue, 23 Mar 2010 16:55:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752687Ab0CWQzO (ORCPT ); Tue, 23 Mar 2010 12:55:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5953 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263Ab0CWQzH (ORCPT ); Tue, 23 Mar 2010 12:55:07 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2NGt5cc030719 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 23 Mar 2010 12:55:06 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2NGt56L019364; Tue, 23 Mar 2010 12:55:05 -0400 Received: from amt.cnet (vpn-10-84.rdu.redhat.com [10.11.10.84]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o2NGt3QO032023; Tue, 23 Mar 2010 12:55:04 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 8AEA2652087; Tue, 23 Mar 2010 13:54:01 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id o2NGs0Kx019870; Tue, 23 Mar 2010 13:54:00 -0300 Message-Id: <20100323165346.726052848@amt.cnet> User-Agent: quilt/0.47-1 Date: Tue, 23 Mar 2010 13:53:34 -0300 From: Marcelo Tosatti To: kvm@vger.kernel.org Cc: Marcelo Tosatti Subject: [patch 1/6] remove kvm_update_dirty_pages_log call from ram_save_block References: <20100323165333.062022913@amt.cnet> Content-Disposition: inline; filename=remove-saveram-kvm-update-dirty-log X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Mar 2010 16:55:18 +0000 (UTC) Index: qemu-kvm-cleanups/vl.c =================================================================== --- qemu-kvm-cleanups.orig/vl.c +++ qemu-kvm-cleanups/vl.c @@ -2782,15 +2782,6 @@ static int ram_save_block(QEMUFile *f) int found = 0; while (addr < last_ram_offset) { - if (kvm_enabled() && current_addr == 0) { - int r; - r = kvm_update_dirty_pages_log(); - if (r) { - fprintf(stderr, "%s: update dirty pages log failed %d\n", __FUNCTION__, r); - qemu_file_set_error(f); - return 0; - } - } if (cpu_physical_memory_get_dirty(current_addr, MIGRATION_DIRTY_FLAG)) { uint8_t *p; Index: qemu-kvm-cleanups/qemu-kvm.c =================================================================== --- qemu-kvm-cleanups.orig/qemu-kvm.c +++ qemu-kvm-cleanups/qemu-kvm.c @@ -2338,20 +2338,6 @@ static int kvm_get_dirty_bitmap_cb(unsig return kvm_get_dirty_pages_log_range(start, bitmap, start, len); } -/* - * get kvm's dirty pages bitmap and update qemu's - * we only care about physical ram, which resides in slots 0 and 3 - */ -int kvm_update_dirty_pages_log(void) -{ - int r = 0; - - - r = kvm_get_dirty_pages_range(kvm_context, 0, -1UL, NULL, - kvm_get_dirty_bitmap_cb); - return r; -} - void kvm_qemu_log_memory(target_phys_addr_t start, target_phys_addr_t size, int log) { Index: qemu-kvm-cleanups/qemu-kvm.h =================================================================== --- qemu-kvm-cleanups.orig/qemu-kvm.h +++ qemu-kvm-cleanups/qemu-kvm.h @@ -836,7 +836,6 @@ void kvm_hpet_disable_kpit(void); int kvm_set_irq(int irq, int level, int *status); int kvm_physical_memory_set_dirty_tracking(int enable); -int kvm_update_dirty_pages_log(void); void qemu_kvm_call_with_env(void (*func)(void *), void *data, CPUState *env); void qemu_kvm_cpuid_on_env(CPUState *env);