aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-09-08 13:47:38 -0400
committerAvi Kivity <avi@redhat.com>2009-12-03 02:32:10 -0500
commite8b3433a5c062e94e34cadb6144c10689a497bc3 (patch)
tree51af19ba8f6a25e02dc8a1530a0d7bbd2f5a7a3b /arch/x86/kvm/svm.c
parent80ced186d1761d2a66163d9eeb468ddb1f7e0697 (diff)
KVM: SVM: remove needless mmap_sem acquision from nested_svm_map
nested_svm_map unnecessarily takes mmap_sem around gfn_to_page, since gfn_to_page / get_user_pages are responsible for it. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 92048a626d4e..f54c4f9d2865 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1396,10 +1396,7 @@ static void *nested_svm_map(struct vcpu_svm *svm, u64 gpa, enum km_type idx)
1396{ 1396{
1397 struct page *page; 1397 struct page *page;
1398 1398
1399 down_read(&current->mm->mmap_sem);
1400 page = gfn_to_page(svm->vcpu.kvm, gpa >> PAGE_SHIFT); 1399 page = gfn_to_page(svm->vcpu.kvm, gpa >> PAGE_SHIFT);
1401 up_read(&current->mm->mmap_sem);
1402
1403 if (is_error_page(page)) 1400 if (is_error_page(page))
1404 goto error; 1401 goto error;
1405 1402