> -----Original Message-----
> From: Jan Beulich [mailto:jbeul...@suse.com]
> Sent: Wednesday, December 9, 2015 10:53 PM
> To: xen-devel <xen-de...@lists.xenproject.org>
> Cc: Wu, Feng <feng...@intel.com>; Tian, Kevin <kevin.t...@intel.com>
> Subject: [PATCH] VT-d: make flush-all actually flush all
> 
> VT-d: make flush-all actually flush all
> 
> Passing gfn=0 and page_count=0 actually avoids the
> iommu_flush_iotlb_dsi() and results in page-specific invalidation
> instead.
> 
> Reported-by: "张智" <zhangzhi2...@caep.cn>
> Signed-off-by: Jan Beulich <jbeul...@suse.com>
> 
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -583,7 +583,7 @@ static void __intel_iommu_iotlb_flush(st
>          if ( iommu_domid == -1 )
>              continue;
> 
> -        if ( page_count > 1 || gfn == -1 )
> +        if ( page_count != 1 || gfn == INVALID_GFN )

This patch looks good me, but I think using 'page_count'  to decide
whether using dsi or psi is not a good idea, since psi should also support
invalidate multiple pages from VT-d Spec. (Seems no support in Xen?)

Thanks,
Feng
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to