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

Re: [Xen-devel] [RFC 12/16] xen/arm: Rework p2m_cache_flush to take a range [begin, end)



On Mon, 8 Oct 2018, Julien Grall wrote:
> The function will be easier to re-use in a follow-up patch if you have
> only the begin and end.
> 
> At the same time, rename the function to reflect the change in the
> prototype.
> 
> Signed-off-by: Julien Grall <julien.grall@xxxxxxx>

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>


> ---
>  xen/arch/arm/domctl.c     | 2 +-
>  xen/arch/arm/p2m.c        | 3 +--
>  xen/include/asm-arm/p2m.h | 7 +++++--
>  3 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
> index 4587c75826..c10f568aad 100644
> --- a/xen/arch/arm/domctl.c
> +++ b/xen/arch/arm/domctl.c
> @@ -61,7 +61,7 @@ long arch_do_domctl(struct xen_domctl *domctl, struct 
> domain *d,
>          if ( e < s )
>              return -EINVAL;
>  
> -        return p2m_cache_flush(d, _gfn(s), domctl->u.cacheflush.nr_pfns);
> +        return p2m_cache_flush_range(d, _gfn(s), _gfn(e));
>      }
>      case XEN_DOMCTL_bind_pt_irq:
>      {
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index af445d3313..8537b7bab1 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -1507,10 +1507,9 @@ int relinquish_p2m_mapping(struct domain *d)
>      return rc;
>  }
>  
> -int p2m_cache_flush(struct domain *d, gfn_t start, unsigned long nr)
> +int p2m_cache_flush_range(struct domain *d, gfn_t start, gfn_t end)
>  {
>      struct p2m_domain *p2m = p2m_get_hostp2m(d);
> -    gfn_t end = gfn_add(start, nr);
>      gfn_t next_gfn;
>      p2m_type_t t;
>      unsigned int order;
> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
> index c03557544a..d7afa2bbe8 100644
> --- a/xen/include/asm-arm/p2m.h
> +++ b/xen/include/asm-arm/p2m.h
> @@ -224,8 +224,11 @@ int p2m_set_entry(struct p2m_domain *p2m,
>                    p2m_type_t t,
>                    p2m_access_t a);
>  
> -/* Clean & invalidate caches corresponding to a region of guest address 
> space */
> -int p2m_cache_flush(struct domain *d, gfn_t start, unsigned long nr);
> +/*
> + * Clean & invalidate caches corresponding to a region [start,end) of guest
> + * address space.
> + */
> +int p2m_cache_flush_range(struct domain *d, gfn_t start, gfn_t end);
>  
>  /*
>   * Map a region in the guest p2m with a specific p2m type.
> -- 
> 2.11.0
> 

_______________________________________________
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®.