Commit 02b27c1f authored by Uri Lublin's avatar Uri Lublin Committed by Avi Kivity

kvm: move do_remove_write_access() up

To be called from kvm_vm_ioctl_set_memory_region()
Signed-off-by: default avatarUri Lublin <uril@qumranet.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent cd1a4a98
...@@ -611,6 +611,13 @@ void fx_init(struct kvm_vcpu *vcpu) ...@@ -611,6 +611,13 @@ void fx_init(struct kvm_vcpu *vcpu)
} }
EXPORT_SYMBOL_GPL(fx_init); 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 * Allocate some memory and give it an address in the guest physical address
* space. * space.
...@@ -756,13 +763,6 @@ static int kvm_vm_ioctl_set_memory_region(struct kvm *kvm, ...@@ -756,13 +763,6 @@ static int kvm_vm_ioctl_set_memory_region(struct kvm *kvm,
return r; 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. * Get (and clear) the dirty memory log for a memory slot.
*/ */
......
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