aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 61eddbeabeb..108f07267e8 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -946,10 +946,8 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
946 /* ...but clean it before doing the actual write */ 946 /* ...but clean it before doing the actual write */
947 vcpu->arch.time_offset = data & ~(PAGE_MASK | 1); 947 vcpu->arch.time_offset = data & ~(PAGE_MASK | 1);
948 948
949 down_read(&current->mm->mmap_sem);
950 vcpu->arch.time_page = 949 vcpu->arch.time_page =
951 gfn_to_page(vcpu->kvm, data >> PAGE_SHIFT); 950 gfn_to_page(vcpu->kvm, data >> PAGE_SHIFT);
952 up_read(&current->mm->mmap_sem);
953 951
954 if (is_error_page(vcpu->arch.time_page)) { 952 if (is_error_page(vcpu->arch.time_page)) {
955 kvm_release_page_clean(vcpu->arch.time_page); 953 kvm_release_page_clean(vcpu->arch.time_page);
@@ -2322,9 +2320,7 @@ static int emulator_cmpxchg_emulated(unsigned long addr,
2322 2320
2323 val = *(u64 *)new; 2321 val = *(u64 *)new;
2324 2322
2325 down_read(&current->mm->mmap_sem);
2326 page = gfn_to_page(vcpu->kvm, gpa >> PAGE_SHIFT); 2323 page = gfn_to_page(vcpu->kvm, gpa >> PAGE_SHIFT);
2327 up_read(&current->mm->mmap_sem);
2328 2324
2329 kaddr = kmap_atomic(page, KM_USER0); 2325 kaddr = kmap_atomic(page, KM_USER0);
2330 set_64bit((u64 *)(kaddr + offset_in_page(gpa)), val); 2326 set_64bit((u64 *)(kaddr + offset_in_page(gpa)), val);
@@ -3089,9 +3085,7 @@ static void vapic_enter(struct kvm_vcpu *vcpu)
3089 if (!apic || !apic->vapic_addr) 3085 if (!apic || !apic->vapic_addr)
3090 return; 3086 return;
3091 3087
3092 down_read(&current->mm->mmap_sem);
3093 page = gfn_to_page(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT); 3088 page = gfn_to_page(vcpu->kvm, apic->vapic_addr >> PAGE_SHIFT);
3094 up_read(&current->mm->mmap_sem);
3095 3089
3096 vcpu->arch.apic->vapic_page = page; 3090 vcpu->arch.apic->vapic_page = page;
3097} 3091}