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] [PATCH] VT-d code cleanup

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] VT-d code cleanup
From: "Zhao, Yu" <yu.zhao@xxxxxxxxx>
Date: Fri, 05 Dec 2008 15:33:30 +0800
Cc: "Kay, Allen M" <allen.m.kay@xxxxxxxxx>, "Han, Weidong" <weidong.han@xxxxxxxxx>, 'Keir Fraser' <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 04 Dec 2008 23:34:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <715D42877B251141A38726ABF5CABF2C018BF04D74@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <715D42877B251141A38726ABF5CABF2C018BF04D74@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)
This patch narrow context caching flush range from the domain-selective to the device-selective, when unmapping a device.

Signed-off-by: Yu Zhao <yu.zhao@xxxxxxxxx>
diff -r f39673ce7d6e xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Mon Dec 01 13:45:46 2008 +0000
+++ b/xen/drivers/passthrough/vtd/iommu.c       Tue Dec 02 06:27:02 2008 -0500
@@ -1308,7 +1308,9 @@
     context_clear_entry(*context);
     iommu_flush_cache_entry(context);
 
-    if ( iommu_flush_context_domain(iommu, domain_iommu_domid(domain), 0) )
+    if ( iommu_flush_context_device(iommu, domain_iommu_domid(domain),
+                                    (((u16)bus) << 8) | devfn,
+                                    DMA_CCMD_MASK_NOBIT, 0) )
         iommu_flush_write_buffer(iommu);
     else
         iommu_flush_iotlb_dsi(iommu, domain_iommu_domid(domain), 0);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] VT-d code cleanup, Zhao, Yu <=