diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2007-12-20 19:18:26 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 18:01:21 +0200 |
commit | aaee2c94f7a1f7726e360a6cfb40173bd552bcff (patch) | |
tree | e9066ae5509c349bfd6a187e85d52cc476e16a12 /arch/x86/kvm/vmx.c | |
parent | d7824fff896a1698a07a8046dc362f4500c302f7 (diff) |
KVM: MMU: Switch to mmu spinlock
Convert the synchronization of the shadow handling to a separate mmu_lock
spinlock.
Also guard fetch() by mmap_sem in read-mode to protect against alias
and memslot changes.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index c39493feba4..3d251f894a8 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1477,7 +1477,6 @@ static int alloc_apic_access_page(struct kvm *kvm) struct kvm_userspace_memory_region kvm_userspace_mem; int r = 0; - mutex_lock(&kvm->lock); down_write(¤t->mm->mmap_sem); if (kvm->arch.apic_access_page) goto out; @@ -1491,7 +1490,6 @@ static int alloc_apic_access_page(struct kvm *kvm) kvm->arch.apic_access_page = gfn_to_page(kvm, 0xfee00); out: up_write(¤t->mm->mmap_sem); - mutex_unlock(&kvm->lock); return r; } |