* KVM: SVM: remove needless mmap_sem acquision from nested_svm_map
@ 2009-09-08 17:47 Marcelo Tosatti
2009-09-09 8:37 ` Alexander Graf
2009-09-09 11:56 ` Avi Kivity
0 siblings, 2 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2009-09-08 17:47 UTC (permalink / raw)
To: kvm; +Cc: Alexander Graf
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>
Index: kvm/arch/x86/kvm/svm.c
===================================================================
--- kvm.orig/arch/x86/kvm/svm.c
+++ kvm/arch/x86/kvm/svm.c
@@ -1394,10 +1394,7 @@ static void *nested_svm_map(struct vcpu_
{
struct page *page;
- down_read(¤t->mm->mmap_sem);
page = gfn_to_page(svm->vcpu.kvm, gpa >> PAGE_SHIFT);
- up_read(¤t->mm->mmap_sem);
-
if (is_error_page(page))
goto error;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: KVM: SVM: remove needless mmap_sem acquision from nested_svm_map
2009-09-08 17:47 KVM: SVM: remove needless mmap_sem acquision from nested_svm_map Marcelo Tosatti
@ 2009-09-09 8:37 ` Alexander Graf
2009-09-09 11:56 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2009-09-09 8:37 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm
On 08.09.2009, at 19:47, Marcelo Tosatti wrote:
>
> nested_svm_map unnecessarily takes mmap_sem around gfn_to_page, since
> gfn_to_page / get_user_pages are responsible for it.
Looks good. Sorry I didn't send it out yet.
(not tested, only looked at the code)
Acked-By: Alexander Graf <agraf@suse.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: KVM: SVM: remove needless mmap_sem acquision from nested_svm_map
2009-09-08 17:47 KVM: SVM: remove needless mmap_sem acquision from nested_svm_map Marcelo Tosatti
2009-09-09 8:37 ` Alexander Graf
@ 2009-09-09 11:56 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2009-09-09 11:56 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm, Alexander Graf
On 09/08/2009 08:47 PM, Marcelo Tosatti wrote:
> nested_svm_map unnecessarily takes mmap_sem around gfn_to_page, since
> gfn_to_page / get_user_pages are responsible for it.
>
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-09 11:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-08 17:47 KVM: SVM: remove needless mmap_sem acquision from nested_svm_map Marcelo Tosatti
2009-09-09 8:37 ` Alexander Graf
2009-09-09 11:56 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).