On Tue, 2008-08-05 at 14:01 +0800, Yang, Sheng wrote: > On Tuesday 29 July 2008 00:26:28 Ben-Ami Yassour wrote: > > [Ben: fixed memory pinning] > > > > kvm_free_physmem_slot(&old, &new); > > + > > + /* map the pages in iommu page table */ > > + if (intel_iommu_found()) > > + kvm_iommu_map_pages(kvm, base_gfn, npages); > > + > > Realize one serious problem here: this line pinned all memory > regardless of if VT-d device have been assigned. That's means if VT-d > engine is there(even without assigned device), KVM would pin all > memory, then disable swapping capability. It's very undesired... I > don't know if Avi aware of that. > > I think we should check assigned device list here to avoid this kind > of thing happen. Also, we may need a lock here to prevent racy with > assign_device().
Agree. good catch. we will add that in the next version. Regards, Ben -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html