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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <avi@xxxxxxxxxx>
> ---
> 
> 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.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux