From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhao, Yu" Subject: [PATCH] VT-d code cleanup Date: Fri, 05 Dec 2008 15:33:30 +0800 Message-ID: <4938D94A.5090905@intel.com> References: <715D42877B251141A38726ABF5CABF2C018BF04D74@pdsmsx503.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010406020208050900060603" Return-path: In-Reply-To: <715D42877B251141A38726ABF5CABF2C018BF04D74@pdsmsx503.ccr.corp.intel.com> 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" Cc: "Kay, Allen M" , "Han, Weidong" , 'Keir Fraser' List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------010406020208050900060603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This patch narrow context caching flush range from the domain-selective to the device-selective, when unmapping a device. Signed-off-by: Yu Zhao --------------010406020208050900060603 Content-Type: text/plain; name="vtd-cci.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vtd-cci.patch" 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); --------------010406020208050900060603 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 --------------010406020208050900060603--