> From: Quan Xu
> Sent: Monday, April 18, 2016 10:00 PM
> 
> While grant table is unmapping, the domain (with the exception of the

unmapping -> unmapped.

> hardware domain) may be crashed due to IOMMU mapping and unmapping
> failures, and then it is unnecessary to flush specified CPUs' TLBs.

Above description is not complete. You said "with the exception of
the hardware domain". Then people will ask whether 'unnecessary'
is also true for hardware domain (if not restriction for hardware
domain to invoke those interfaces).

> 
> Signed-off-by: Quan Xu <quan...@intel.com>
> 
> CC: Ian Jackson <ian.jack...@eu.citrix.com>
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Keir Fraser <k...@xen.org>
> CC: Tim Deegan <t...@xen.org>
> ---
>  xen/common/grant_table.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
> index 8b22299..1801fe9 100644
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -1366,8 +1366,9 @@ gnttab_unmap_grant_ref(
> 
>      return 0;
> 
> -fault:
> -    gnttab_flush_tlb(current->domain);
> + fault:
> +    if ( current->domain->is_shut_down )
> +        gnttab_flush_tlb(current->domain);
> 
>      for ( i = 0; i < partial_done; i++ )
>          __gnttab_unmap_common_complete(&(common[i]));
> @@ -1429,8 +1430,9 @@ gnttab_unmap_and_replace(
> 
>      return 0;
> 
> -fault:
> -    gnttab_flush_tlb(current->domain);
> + fault:
> +    if ( current->domain->is_shut_down )
> +        gnttab_flush_tlb(current->domain);
> 
>      for ( i = 0; i < partial_done; i++ )
>          __gnttab_unmap_common_complete(&(common[i]));
> --
> 1.9.1
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to