WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Does xc_map_foreign_pages() update IOMMU tables?
From: Joanna Rutkowska <joanna@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 May 2010 13:48:27 +0200
Delivery-date: Thu, 13 May 2010 04:46:20 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:content-type; s=smtpout; bh=lxSNC9mhzY9F7mEay92slGzXDyA=; b=V/GwDcm2OliRbRqkk9hx+bDPkD4Ja9aZwjMFjykUCFDH3qTTzeN2Fx7+k+XHbkwqo59FjMT7svJmTlfgj7IyGmAICqhG5lZmkQMUgvIyKRJvpa0sVYCT0vzcN/37tG9y5Sdh+t87RBC517I6g1TkhzmOACo8VGwJbFdrFXXiJ08=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.4
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: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>