Skip to content

Commit

Permalink
kvm: move do_remove_write_access() up
Browse files Browse the repository at this point in the history
To be called from kvm_vm_ioctl_set_memory_region()

Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Uri Lublin authored and Avi Kivity committed Mar 4, 2007
1 parent cd1a4a9 commit 02b27c1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,13 @@ void fx_init(struct kvm_vcpu *vcpu)
}
EXPORT_SYMBOL_GPL(fx_init);

static void do_remove_write_access(struct kvm_vcpu *vcpu, int slot)
{
spin_lock(&vcpu->kvm->lock);
kvm_mmu_slot_remove_write_access(vcpu, slot);
spin_unlock(&vcpu->kvm->lock);
}

/*
* Allocate some memory and give it an address in the guest physical address
* space.
Expand Down Expand Up @@ -756,13 +763,6 @@ static int kvm_vm_ioctl_set_memory_region(struct kvm *kvm,
return r;
}

static void do_remove_write_access(struct kvm_vcpu *vcpu, int slot)
{
spin_lock(&vcpu->kvm->lock);
kvm_mmu_slot_remove_write_access(vcpu, slot);
spin_unlock(&vcpu->kvm->lock);
}

/*
* Get (and clear) the dirty memory log for a memory slot.
*/
Expand Down

0 comments on commit 02b27c1

Please sign in to comment.