mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
kvm: move do_remove_write_access() up
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>
This commit is contained in:
parent
cd1a4a982a
commit
02b27c1f80
1 changed files with 7 additions and 7 deletions
|
@ -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.
|
||||
|
@ -756,13 +763,6 @@ out:
|
|||
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.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue