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

Re: [Xen-devel] Does xc_map_foreign_pages() update IOMMU tables?

On 13/05/2010 12:48, "Joanna Rutkowska" <joanna@xxxxxxxxxxxxxxxxxxxxxx>

> Does the xc_map_foreign_pages() update also the IOMMU/VT-d tables so
> that the mapped pages belong also to Dom0 (from the IOMMU point of view)?

Seeing as how xc_map_foreign_pages() maps pages into a particular
guest-process virtual address space, whereas IOMMU tables are a mapping from
guest-physical address space, it's clear that x_m_f_p() cannot sensibly be
having any effect on the IOMMU.

 -- Keir

> It seems like it does indeed. We use this function in Qubes GUI
> virtualization to map composition buffers from DomUs into Dom0. Then we
> use XShmPutImage() in Dom0 to display them. We've been told [1] that
> XShmPutImage() often uses DMA to copy pages to the video memory,
> especially in case of accelerated drivers. And we verified that our GUI
> works fine on VT-d systems e.g. with Intel drivers with h/w acceleration
> enabled and with iommu=pv enabled. This suggests that
> xc_map_foreign_pages() indeed must be adding mapped pages to the IOMMU
> tables for Dom0, as otherwise XShmPutImage() would not be able to
> DMA-read the contents of those pages, that originally belonged to some
> other DomUs.
> Am I missing something? If not, can somebody point me to the actual code
> in Xen which does this update?
> Thanks a lot!
> joanna.
> [1] http://groups.google.com/group/qubes-devel/msg/9d23cd9c26127ed7

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.