[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: [PATCH 1/6] vtd: Refactor iotlb flush code



Allen,

You are probably talking about __intel_iommu_iotlb_flush.
This function takes a range of address to flush. I haven't
found a function in the vtd code to invalidate a range on
address without doing a loop of flush_iotlb_psi, so I thought
that the most efficient and quick way to flush a range would
be to use a domain selective invalidation.

Jean

On 08/11 03:10, Kay, Allen M wrote:
> Jean,
> 
> The original code does not call iommu_flush_iotlb_dsi().  What is the reason 
> the refractored code need to use domain selective invalidation?
> 
> Allen
> -----
> 
> +        if ( page_count > 1 || gfn == -1 )
> +        {
> +            if ( iommu_flush_iotlb_dsi(iommu, iommu_domid,
> +                        0, flush_dev_iotlb) )
> +                iommu_flush_write_buffer(iommu);
> +        }
> +        else
> +        {
> +            if ( iommu_flush_iotlb_psi(iommu, iommu_domid,
> +                        (paddr_t)gfn << PAGE_SHIFT_4K, 0,
> +                        !dma_old_pte_present, flush_dev_iotlb) )
> +                iommu_flush_write_buffer(iommu);
> 
> -----Original Message-----
> From: Jean Guyader [mailto:jean.guyader@xxxxxxxxxxxxx] 
> Sent: Monday, November 07, 2011 10:25 AM
> To: xen-devel@xxxxxxxxxxxxxxxxxxx
> Cc: tim@xxxxxxx; Kay, Allen M; Jean Guyader
> Subject: [PATCH 1/6] vtd: Refactor iotlb flush code
> 
> 
> Factorize the iotlb flush code from map_page and unmap_page into it's own 
> function.
> 
> Signed-off-by: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
> ---
>  xen/drivers/passthrough/vtd/iommu.c |   86 +++++++++++++++++-----------------
>  1 files changed, 43 insertions(+), 43 deletions(-)
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.