Commit a67794ca authored by Lan Tianyu's avatar Lan Tianyu Committed by Paolo Bonzini

Revert "KVM: Eliminate extra function calls in kvm_get_dirty_log_protect()"

The value of "dirty_bitmap[i]" is already check before setting its value
to mask. The following check of "mask" is redundant. The check of "mask" was
introduced by commit 58d2930f ("KVM: Eliminate extra function calls in
kvm_get_dirty_log_protect()"), revert it.
Signed-off-by: default avatarLan Tianyu <Tianyu.Lan@microsoft.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 7539b174
...@@ -1205,11 +1205,9 @@ int kvm_get_dirty_log_protect(struct kvm *kvm, ...@@ -1205,11 +1205,9 @@ int kvm_get_dirty_log_protect(struct kvm *kvm,
mask = xchg(&dirty_bitmap[i], 0); mask = xchg(&dirty_bitmap[i], 0);
dirty_bitmap_buffer[i] = mask; dirty_bitmap_buffer[i] = mask;
if (mask) { offset = i * BITS_PER_LONG;
offset = i * BITS_PER_LONG; kvm_arch_mmu_enable_log_dirty_pt_masked(kvm, memslot,
kvm_arch_mmu_enable_log_dirty_pt_masked(kvm, memslot, offset, mask);
offset, mask);
}
} }
spin_unlock(&kvm->mmu_lock); spin_unlock(&kvm->mmu_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment