]> err.no Git - linux-2.6/commitdiff
kvm: move do_remove_write_access() up
authorUri Lublin <uril@qumranet.com>
Thu, 22 Feb 2007 15:15:33 +0000 (17:15 +0200)
committerAvi Kivity <avi@qumranet.com>
Sun, 4 Mar 2007 09:12:43 +0000 (11:12 +0200)
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>
drivers/kvm/kvm_main.c

index e7108105c50bfa8ecc6d8a76f127c0e3cae47319..be7694db285d49512ae649b77b79f797413bc380 100644 (file)
@@ -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.
  */