Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68376
b: refs/heads/master
c: 3921491
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and Avi Kivity committed Oct 13, 2007
1 parent 2d0b688 commit a500db4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b114b0804df7131cb6764b948c1c530c834fa3c0
refs/heads/master: 39214915f50f6ac2350355f2db63910d968fa790
13 changes: 8 additions & 5 deletions trunk/drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,11 +803,14 @@ static int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
if (copy_to_user(log->dirty_bitmap, memslot->dirty_bitmap, n))
goto out;

mutex_lock(&kvm->lock);
kvm_mmu_slot_remove_write_access(kvm, log->slot);
kvm_flush_remote_tlbs(kvm);
memset(memslot->dirty_bitmap, 0, n);
mutex_unlock(&kvm->lock);
/* If nothing is dirty, don't bother messing with page tables. */
if (any) {
mutex_lock(&kvm->lock);
kvm_mmu_slot_remove_write_access(kvm, log->slot);
kvm_flush_remote_tlbs(kvm);
memset(memslot->dirty_bitmap, 0, n);
mutex_unlock(&kvm->lock);
}

r = 0;

Expand Down

0 comments on commit a500db4

Please sign in to comment.