[patch 4/6] remove unused kvm_dirty_bitmap array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

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


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux