소스 검색

KVM: s390: dont allocate dirty bitmap

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>
Carsten Otte 17 년 전
부모
커밋
eff0114ac3
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      virt/kvm/kvm_main.c

+ 2 - 0
virt/kvm/kvm_main.c

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