summaryrefslogtreecommitdiffstats
path: root/drivers/kvm
diff options
context:
space:
mode:
authorUri Lublin <uril@qumranet.com>2007-02-22 16:15:33 +0100
committerAvi Kivity <avi@qumranet.com>2007-03-04 10:12:43 +0100
commit02b27c1f802bfb60cc2cb5b763dde1b6b3479a7e (patch)
treeb22d1d9750131a4d6f5822dd8dec84438657f3c2 /drivers/kvm
parentKVM: Fix dirty page log bitmap size/access calculation (diff)
downloadlinux-02b27c1f802bfb60cc2cb5b763dde1b6b3479a7e.tar.xz
linux-02b27c1f802bfb60cc2cb5b763dde1b6b3479a7e.zip
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>
Diffstat (limited to 'drivers/kvm')
-rw-r--r--drivers/kvm/kvm_main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index e7108105c50b..be7694db285d 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -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.
*/