From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, Joerg Roedel <joerg.roedel@amd.com>
Subject: Re: [PATCH] KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots
Date: Mon, 10 May 2010 10:39:01 +0300 [thread overview]
Message-ID: <4BE7B815.2050401@redhat.com> (raw)
In-Reply-To: <20100506191055.GB3432@amt.cnet>
On 05/06/2010 10:10 PM, Marcelo Tosatti wrote:
> On Tue, May 04, 2010 at 01:03:50PM +0300, Avi Kivity wrote:
>
>> On svm, kvm_read_pdptr() may require reading guest memory, which can sleep.
>>
>> Push the spinlock into mmu_alloc_roots(), and only take it after we've read
>> the pdptr.
>>
>> Marcelo, dropping and re-acquiring the lock before mmu_sync_roots(), is fine,
>> yes?
>>
> Yes, but you should call kvm_mmu_free_some_pages after reacquiring the
> spin_lock, to guarantee kvm_mmu_alloc_page won't fail.
>
>
We never fail due to lack of free pages (but I agree it's cleaner).
The patch is already in, I'll send an incremental.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2010-05-10 7:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 10:03 [PATCH] KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots Avi Kivity
2010-05-04 10:59 ` Roedel, Joerg
2010-05-06 19:10 ` Marcelo Tosatti
2010-05-10 7:39 ` Avi Kivity [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BE7B815.2050401@redhat.com \
--to=avi@redhat.com \
--cc=joerg.roedel@amd.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.