diff options
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/kvm_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 49900fc21f89..ce7888a15128 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -1053,9 +1053,11 @@ int kvm_get_dirty_log_protect(struct kvm *kvm, | |||
1053 | mask = xchg(&dirty_bitmap[i], 0); | 1053 | mask = xchg(&dirty_bitmap[i], 0); |
1054 | dirty_bitmap_buffer[i] = mask; | 1054 | dirty_bitmap_buffer[i] = mask; |
1055 | 1055 | ||
1056 | offset = i * BITS_PER_LONG; | 1056 | if (mask) { |
1057 | kvm_arch_mmu_enable_log_dirty_pt_masked(kvm, memslot, offset, | 1057 | offset = i * BITS_PER_LONG; |
1058 | mask); | 1058 | kvm_arch_mmu_enable_log_dirty_pt_masked(kvm, memslot, |
1059 | offset, mask); | ||
1060 | } | ||
1059 | } | 1061 | } |
1060 | 1062 | ||
1061 | spin_unlock(&kvm->mmu_lock); | 1063 | spin_unlock(&kvm->mmu_lock); |