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

Re: [Xen-devel] [PATCH v2 for-4.12] arm/p2m: call iommu iotlb flush if iommu exists and enabled



> -----Original Message-----
> From: Andrii Anisov [mailto:andrii.anisov@xxxxxxxxx]
> Sent: 23 January 2019 12:50
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Julien Grall <julien.grall@xxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; Paul Durrant <Paul.Durrant@xxxxxxxxxx>; Juergen
> Gross <jgross@xxxxxxxx>; Andrii Anisov <andrii_anisov@xxxxxxxx>
> Subject: [PATCH v2 for-4.12] arm/p2m: call iommu iotlb flush if iommu
> exists and enabled
> 
> From: Andrii Anisov <andrii_anisov@xxxxxxxx>
> 
> Taking decision by `need_iommu_pt_sync()` make us never kicking
> `iommu_iotlb_flush()` for IOMMUs which do share P2M with CPU.
> So check `has_iommu_pt()` instead.
> 
> Signed-off-by: Andrii Anisov <andrii_anisov@xxxxxxxx>

Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
> Changes in v2:
>     Fixed a missprint and a nit in a commit message
> 
>  xen/arch/arm/p2m.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index 2394f97..059a391 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -1019,7 +1019,7 @@ static int __p2m_set_entry(struct p2m_domain *p2m,
>           !mfn_eq(lpae_get_mfn(*entry), lpae_get_mfn(orig_pte)) )
>          p2m_free_entry(p2m, orig_pte, level);
> 
> -    if ( need_iommu_pt_sync(p2m->domain) &&
> +    if ( has_iommu_pt(p2m->domain) &&
>           (lpae_is_valid(orig_pte) || lpae_is_valid(*entry)) )
>      {
>          unsigned int flush_flags = 0;
> --
> 2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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