xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Joanna Rutkowska <joanna@invisiblethingslab.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Does xc_map_foreign_pages() update IOMMU tables?
Date: Thu, 13 May 2010 13:48:27 +0200	[thread overview]
Message-ID: <4BEBE70B.3080706@invisiblethingslab.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1055 bytes --]

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


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 226 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

             reply	other threads:[~2010-05-13 11:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-13 11:48 Joanna Rutkowska [this message]
2010-05-13 12:00 ` Does xc_map_foreign_pages() update IOMMU tables? Keir Fraser
2010-05-13 12:09   ` Joanna Rutkowska
2010-05-13 12:27     ` Keir Fraser
2010-05-13 12:39       ` Joanna Rutkowska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BEBE70B.3080706@invisiblethingslab.com \
    --to=joanna@invisiblethingslab.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).