diff mbox

[1/6] remove kvm_update_dirty_pages_log call from ram_save_block

Message ID 20100323165346.726052848@amt.cnet (mailing list archive)
State New, archived
Headers show

Commit Message

Marcelo Tosatti March 23, 2010, 4:53 p.m. UTC
None
diff mbox

Patch

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);