diff options
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 22ab7137d1d0..f04e2ff21383 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -2223,7 +2223,7 @@ static int alloc_apic_access_page(struct kvm *kvm) | |||
2223 | struct kvm_userspace_memory_region kvm_userspace_mem; | 2223 | struct kvm_userspace_memory_region kvm_userspace_mem; |
2224 | int r = 0; | 2224 | int r = 0; |
2225 | 2225 | ||
2226 | down_write(&kvm->slots_lock); | 2226 | mutex_lock(&kvm->slots_lock); |
2227 | if (kvm->arch.apic_access_page) | 2227 | if (kvm->arch.apic_access_page) |
2228 | goto out; | 2228 | goto out; |
2229 | kvm_userspace_mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT; | 2229 | kvm_userspace_mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT; |
@@ -2236,7 +2236,7 @@ static int alloc_apic_access_page(struct kvm *kvm) | |||
2236 | 2236 | ||
2237 | kvm->arch.apic_access_page = gfn_to_page(kvm, 0xfee00); | 2237 | kvm->arch.apic_access_page = gfn_to_page(kvm, 0xfee00); |
2238 | out: | 2238 | out: |
2239 | up_write(&kvm->slots_lock); | 2239 | mutex_unlock(&kvm->slots_lock); |
2240 | return r; | 2240 | return r; |
2241 | } | 2241 | } |
2242 | 2242 | ||
@@ -2245,7 +2245,7 @@ static int alloc_identity_pagetable(struct kvm *kvm) | |||
2245 | struct kvm_userspace_memory_region kvm_userspace_mem; | 2245 | struct kvm_userspace_memory_region kvm_userspace_mem; |
2246 | int r = 0; | 2246 | int r = 0; |
2247 | 2247 | ||
2248 | down_write(&kvm->slots_lock); | 2248 | mutex_lock(&kvm->slots_lock); |
2249 | if (kvm->arch.ept_identity_pagetable) | 2249 | if (kvm->arch.ept_identity_pagetable) |
2250 | goto out; | 2250 | goto out; |
2251 | kvm_userspace_mem.slot = IDENTITY_PAGETABLE_PRIVATE_MEMSLOT; | 2251 | kvm_userspace_mem.slot = IDENTITY_PAGETABLE_PRIVATE_MEMSLOT; |
@@ -2260,7 +2260,7 @@ static int alloc_identity_pagetable(struct kvm *kvm) | |||
2260 | kvm->arch.ept_identity_pagetable = gfn_to_page(kvm, | 2260 | kvm->arch.ept_identity_pagetable = gfn_to_page(kvm, |
2261 | kvm->arch.ept_identity_map_addr >> PAGE_SHIFT); | 2261 | kvm->arch.ept_identity_map_addr >> PAGE_SHIFT); |
2262 | out: | 2262 | out: |
2263 | up_write(&kvm->slots_lock); | 2263 | mutex_unlock(&kvm->slots_lock); |
2264 | return r; | 2264 | return r; |
2265 | } | 2265 | } |
2266 | 2266 | ||