All of lore.kernel.org
 help / color / mirror / Atom feed
* Why call iommu_unmap_page() in set_p2m_entry()?
@ 2008-03-13 13:28 Han, Weidong
  2008-03-18 17:29 ` Wei Wang2
  0 siblings, 1 reply; 3+ messages in thread
From: Han, Weidong @ 2008-03-13 13:28 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.wang2, Keir Fraser

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) 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why call iommu_unmap_page() in set_p2m_entry()?
  2008-03-13 13:28 Why call iommu_unmap_page() in set_p2m_entry()? Han, Weidong
@ 2008-03-18 17:29 ` Wei Wang2
  2008-03-19  1:06   ` Han, Weidong
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Wang2 @ 2008-03-18 17:29 UTC (permalink / raw)
  To: Han, Weidong; +Cc: xen-devel, Keir Fraser

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
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Why call iommu_unmap_page() in set_p2m_entry()?
  2008-03-18 17:29 ` Wei Wang2
@ 2008-03-19  1:06   ` Han, Weidong
  0 siblings, 0 replies; 3+ messages in thread
From: Han, Weidong @ 2008-03-19  1:06 UTC (permalink / raw)
  To: Wei Wang2; +Cc: xen-devel, Keir Fraser

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-19  1:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-13 13:28 Why call iommu_unmap_page() in set_p2m_entry()? Han, Weidong
2008-03-18 17:29 ` Wei Wang2
2008-03-19  1:06   ` Han, Weidong

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.