From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] VT-d: fix TLB flushing in dma_pte_clear_one() Date: Mon, 18 Nov 2013 11:43:59 +0000 Message-ID: <5289FD7F.6020405@citrix.com> References: <528A06C90200007800103FA4@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ViNFL-00070i-Hd for xen-devel@lists.xenproject.org; Mon, 18 Nov 2013 11:44:03 +0000 In-Reply-To: <528A06C90200007800103FA4@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , CHENG Yueqiang , "zhangzhi2022@hotmail.com" , xiantao.zhang@intel.com, "junqing@pku.edu.cn" List-Id: xen-devel@lists.xenproject.org On 18/11/13 11:23, Jan Beulich wrote: > The third parameter of __intel_iommu_iotlb_flush() is to indicate > whether the to be flushed entry was a present one. A few lines before, > we bailed if !dma_pte_present(*pte), so there's no need to check the > flag here again - we can simply always pass TRUE here. > > This is XSA-78. > > Suggested-by: Cheng Yueqiang > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper > > --- a/xen/drivers/passthrough/vtd/iommu.c > +++ b/xen/drivers/passthrough/vtd/iommu.c > @@ -646,7 +646,7 @@ static void dma_pte_clear_one(struct dom > iommu_flush_cache_entry(pte, sizeof(struct dma_pte)); > > if ( !this_cpu(iommu_dont_flush_iotlb) ) > - __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K , 0, 1); > + __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K, 1, 1); > > unmap_vtd_domain_page(page); > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel