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>

authored by Uri Lublin and committed by Avi Kivity 02b27c1f cd1a4a98

+7 -7
+7 -7
drivers/kvm/kvm_main.c
··· 611 611 } 612 612 EXPORT_SYMBOL_GPL(fx_init); 613 613 614 + static void do_remove_write_access(struct kvm_vcpu *vcpu, int slot) 615 + { 616 + spin_lock(&vcpu->kvm->lock); 617 + kvm_mmu_slot_remove_write_access(vcpu, slot); 618 + spin_unlock(&vcpu->kvm->lock); 619 + } 620 + 614 621 /* 615 622 * Allocate some memory and give it an address in the guest physical address 616 623 * space. ··· 761 754 kvm_free_physmem_slot(&new, &old); 762 755 out: 763 756 return r; 764 - } 765 - 766 - static void do_remove_write_access(struct kvm_vcpu *vcpu, int slot) 767 - { 768 - spin_lock(&vcpu->kvm->lock); 769 - kvm_mmu_slot_remove_write_access(vcpu, slot); 770 - spin_unlock(&vcpu->kvm->lock); 771 757 } 772 758 773 759 /*