Re: [PATCH] KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots

2010-05-10 Thread Avi Kivity
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 an

Re: [PATCH] KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots

2010-05-06 Thread Marcelo Tosatti
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. > > Signed-off-by: Avi Kivity > --- > > Marcelo, dropping and re

Re: [PATCH] KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots

2010-05-04 Thread Roedel, Joerg
On Tue, May 04, 2010 at 06:03:50AM -0400, 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. This fixes the lockdep issue for me. Thanks. Tested-by: Joerg Roe