diff mbox

[4/6] remove unused kvm_dirty_bitmap array

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

Commit Message

Marcelo Tosatti May 3, 2010, 10:48 p.m. UTC
None
diff mbox

Patch

Index: qemu-kvm-memslot/qemu-kvm.c
===================================================================
--- qemu-kvm-memslot.orig/qemu-kvm.c
+++ qemu-kvm-memslot/qemu-kvm.c
@@ -2154,7 +2154,6 @@  void kvm_set_phys_mem(target_phys_addr_t
  * dirty pages logging
  */
 /* FIXME: use unsigned long pointer instead of unsigned char */
-unsigned char *kvm_dirty_bitmap = NULL;
 int kvm_physical_memory_set_dirty_tracking(int enable)
 {
     int r = 0;
@@ -2163,17 +2162,9 @@  int kvm_physical_memory_set_dirty_tracki
         return 0;
 
     if (enable) {
-        if (!kvm_dirty_bitmap) {
-            unsigned bitmap_size = BITMAP_SIZE(phys_ram_size);
-            kvm_dirty_bitmap = qemu_malloc(bitmap_size);
-            r = kvm_dirty_pages_log_enable_all(kvm_context);
-        }
+        r = kvm_dirty_pages_log_enable_all(kvm_context);
     } else {
-        if (kvm_dirty_bitmap) {
-            r = kvm_dirty_pages_log_reset(kvm_context);
-            qemu_free(kvm_dirty_bitmap);
-            kvm_dirty_bitmap = NULL;
-        }
+        r = kvm_dirty_pages_log_reset(kvm_context);
     }
     return r;
 }