Skip to content

Commit

Permalink
KVM: SVM: remove needless mmap_sem acquision from nested_svm_map
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marcelo Tosatti authored and Avi Kivity committed Dec 3, 2009
1 parent 80ced18 commit e8b3433
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,10 +1396,7 @@ static void *nested_svm_map(struct vcpu_svm *svm, u64 gpa, enum km_type idx)
{
struct page *page;

down_read(&current->mm->mmap_sem);
page = gfn_to_page(svm->vcpu.kvm, gpa >> PAGE_SHIFT);
up_read(&current->mm->mmap_sem);

if (is_error_page(page))
goto error;

Expand Down

0 comments on commit e8b3433

Please sign in to comment.