]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: s390: dont allocate dirty bitmap
authorCarsten Otte <cotte@de.ibm.com>
Fri, 27 Jun 2008 13:05:31 +0000 (15:05 +0200)
committerAvi Kivity <avi@qumranet.com>
Sun, 20 Jul 2008 09:42:36 +0000 (12:42 +0300)
This patch #ifdefs the bitmap array for dirty tracking. We don't have dirty
tracking on s390 today, and we'd love to use our storage keys to store the
dirty information for migration. Therefore, we won't need this array at all,
and due to our limited amount of vmalloc space this limits the amount of guests
we can run.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
virt/kvm/kvm_main.c

index 7d10dfa0d3886ac4884e06099085cd142622cee5..9ccaf8f5402ec05250b11e299271bdb22ff7b00b 100644 (file)
@@ -359,6 +359,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
        r = -ENOMEM;
 
        /* Allocate if a slot is being created */
+#ifndef CONFIG_S390
        if (npages && !new.rmap) {
                new.rmap = vmalloc(npages * sizeof(struct page *));
 
@@ -399,6 +400,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
                        goto out_free;
                memset(new.dirty_bitmap, 0, dirty_bytes);
        }
+#endif /* not defined CONFIG_S390 */
 
        if (mem->slot >= kvm->nmemslots)
                kvm->nmemslots = mem->slot + 1;