Han, Weidong
2008-Mar-13 13:28 UTC
[Xen-devel] Why call iommu_unmap_page() in set_p2m_entry()?
As my understanding, AMD IOMMU doesn''t share its page tables with p2m table. So it needs call iommu_unmap_page() to free pages when shut down or destroy domain. Now iommu_unmap_page() is only called in set_p2m_entry(), I think it won''t be executed when shut down or destroy domain. I''m not familiar with AMD IOMMU code, maybe I missed something. Can you explain why do that? Thanks! Randy (Weidong) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Wei Wang2
2008-Mar-18 17:29 UTC
Re: [Xen-devel] Why call iommu_unmap_page() in set_p2m_entry()?
Hi Weidong, Thanks for pointing it out. iommu_unmap_page() is not intended for flushing all iotlb entries. As AMD-IOMMU also supports domain-selective unmapping and I seem to find related functions in vtd code,I hope this operation can also be generic. If not, I plan to put this into amd specific functions called by domain destroy routines. Wei On Thu, 2008-03-13 at 14:28 +0100, Han, Weidong wrote:> As my understanding, AMD IOMMU doesn''t share its page tables with p2m > table. So it needs call iommu_unmap_page() to free pages when shut > down > or destroy domain. Now iommu_unmap_page() is only called in > set_p2m_entry(), I think it won''t be executed when shut down or > destroy > domain. I''m not familiar with AMD IOMMU code, maybe I missed > something. > Can you explain why do that? Thanks! > > Randy (Weidong) > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2008-Mar-19 01:06 UTC
RE: [Xen-devel] Why call iommu_unmap_page() in set_p2m_entry()?
Hi Wei, I missed something of your code. Now I understand, it''s no problem. The operation can be generic. Thanks! Randy (Weidong) Wei Wang2 wrote:> Hi Weidong, > Thanks for pointing it out. iommu_unmap_page() is not intended for > flushing all iotlb entries. As AMD-IOMMU also supports > domain-selective unmapping and I seem to find related functions in > vtd code,I hope this operation can also be generic. If not, I plan to > put this into amd specific functions called by domain destroy > routines. > > Wei > > On Thu, 2008-03-13 at 14:28 +0100, Han, Weidong wrote: >> As my understanding, AMD IOMMU doesn''t share its page tables with p2m >> table. So it needs call iommu_unmap_page() to free pages when shut >> down or destroy domain. Now iommu_unmap_page() is only called in >> set_p2m_entry(), I think it won''t be executed when shut down or >> destroy domain. I''m not familiar with AMD IOMMU code, maybe I missed >> something. Can you explain why do that? Thanks! >> >> Randy (Weidong) >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel