From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joanna Rutkowska Subject: Does xc_map_foreign_pages() update IOMMU tables? Date: Thu, 13 May 2010 13:48:27 +0200 Message-ID: <4BEBE70B.3080706@invisiblethingslab.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2007252478==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============2007252478== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB1DFDB085BCF0B06269BC693" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB1DFDB085BCF0B06269BC693 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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)?= 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=3Dpv 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 --------------enigB1DFDB085BCF0B06269BC693 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAkvr5wsACgkQORdkotfEW85/zQCg8Db8LOmf+trhSZthL82bt0/g ccYAoJGoNVcShLj+h8a/YlF3zC1Lwxrm =y8JQ -----END PGP SIGNATURE----- --------------enigB1DFDB085BCF0B06269BC693-- --===============2007252478== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============2007252478==--