diff options
author | Jason J. Herne <jjherne@us.ibm.com> | 2012-08-02 10:10:17 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-04-22 03:36:28 -0400 |
commit | 15f36ebd34b5b296c274ef67024f14c2d394a507 (patch) | |
tree | 62736639cca862b5a9c99ca07893be6374c2f76d /virt/kvm/kvm_main.c | |
parent | a0bf4f149bbfa2e31b5f4172c817afdb7b986733 (diff) |
KVM: s390: Add proper dirty bitmap support to S390 kvm.
Replace the kvm_s390_sync_dirty_log() stub with code to construct the KVM
dirty_bitmap from S390 memory change bits. Also add code to properly clear
the dirty_bitmap size when clearing the bitmap.
Signed-off-by: Jason J. Herne <jjherne@us.ibm.com>
CC: Dominik Dingel <dingel@linux.vnet.ibm.com>
[Dominik Dingel: use gmap_test_and_clear_dirty, locking fixes]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r-- | virt/kvm/kvm_main.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 56baae8c2f56..7facdb1f1374 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -637,14 +637,12 @@ static int kvm_vm_release(struct inode *inode, struct file *filp) | |||
637 | */ | 637 | */ |
638 | static int kvm_create_dirty_bitmap(struct kvm_memory_slot *memslot) | 638 | static int kvm_create_dirty_bitmap(struct kvm_memory_slot *memslot) |
639 | { | 639 | { |
640 | #ifndef CONFIG_S390 | ||
641 | unsigned long dirty_bytes = 2 * kvm_dirty_bitmap_bytes(memslot); | 640 | unsigned long dirty_bytes = 2 * kvm_dirty_bitmap_bytes(memslot); |
642 | 641 | ||
643 | memslot->dirty_bitmap = kvm_kvzalloc(dirty_bytes); | 642 | memslot->dirty_bitmap = kvm_kvzalloc(dirty_bytes); |
644 | if (!memslot->dirty_bitmap) | 643 | if (!memslot->dirty_bitmap) |
645 | return -ENOMEM; | 644 | return -ENOMEM; |
646 | 645 | ||
647 | #endif /* !CONFIG_S390 */ | ||
648 | return 0; | 646 | return 0; |
649 | } | 647 | } |
650 | 648 | ||