diff options
author | Carsten Otte <cotte@de.ibm.com> | 2008-06-27 09:05:31 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-07-20 05:42:36 -0400 |
commit | eff0114ac3d3a20a5c93b31b00134e59bfc75189 (patch) | |
tree | 32272e088d90148842b260c650d4c66e2b5d91a5 | |
parent | f8b78fa3d406f3a2dc038e2b47749013a9295994 (diff) |
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>
-rw-r--r-- | virt/kvm/kvm_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 7d10dfa0d388..9ccaf8f5402e 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -359,6 +359,7 @@ int __kvm_set_memory_region(struct kvm *kvm, | |||
359 | r = -ENOMEM; | 359 | r = -ENOMEM; |
360 | 360 | ||
361 | /* Allocate if a slot is being created */ | 361 | /* Allocate if a slot is being created */ |
362 | #ifndef CONFIG_S390 | ||
362 | if (npages && !new.rmap) { | 363 | if (npages && !new.rmap) { |
363 | new.rmap = vmalloc(npages * sizeof(struct page *)); | 364 | new.rmap = vmalloc(npages * sizeof(struct page *)); |
364 | 365 | ||
@@ -399,6 +400,7 @@ int __kvm_set_memory_region(struct kvm *kvm, | |||
399 | goto out_free; | 400 | goto out_free; |
400 | memset(new.dirty_bitmap, 0, dirty_bytes); | 401 | memset(new.dirty_bitmap, 0, dirty_bytes); |
401 | } | 402 | } |
403 | #endif /* not defined CONFIG_S390 */ | ||
402 | 404 | ||
403 | if (mem->slot >= kvm->nmemslots) | 405 | if (mem->slot >= kvm->nmemslots) |
404 | kvm->nmemslots = mem->slot + 1; | 406 | kvm->nmemslots = mem->slot + 1; |