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

Re: [Xen-devel] [PATCH v9 07/14] xen/common: add ARM stub for the function memory_type_changed()



On Wed, 2014-07-02 at 20:42 +0200, Arianna Avanzini wrote:
> MTRR-related code is not available for the ARM architecture. Given
> that the memory_type_changed() function would be called also from
> common code, its invocation is currently ifdef'd out to be only
> compiled in on an x86 machine. This commit adds an empty stub for ARM.
> 
> Signed-off-by: Arianna Avanzini <avanzini.arianna@xxxxxxxxx>
> Cc: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> Cc: Paolo Valente <paolo.valente@xxxxxxxxxx>
> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> Cc: Julien Grall <julien.grall@xxxxxxxxxx>

Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>

> Cc: Jan Beulich <JBeulich@xxxxxxxx>
> Cc: Keir Fraser <keir@xxxxxxx>
> Cc: Tim Deegan <tim@xxxxxxx>
> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Cc: Eric Trudeau <etrudeau@xxxxxxxxxxxx>
> Cc: Viktor Kleinik <viktor.kleinik@xxxxxxxxxxxxxxx>
> 
> ---
> 
>     v9:
>         - Don't expose the memory_type_changed() function to common code,
>           just add an empty stub in arch/arm/p2m.c and in the related header
>           for ARM.
> 
> ---
>  xen/arch/arm/p2m.c        | 4 ++++
>  xen/common/domctl.c       | 2 --
>  xen/include/asm-arm/p2m.h | 2 ++
>  3 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index 92fc4ec..1b87a4e 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -14,6 +14,10 @@
>  #define P2M_FIRST_ORDER 1
>  #define P2M_FIRST_ENTRIES (LPAE_ENTRIES<<P2M_FIRST_ORDER)
>  
> +void memory_type_changed(struct domain *d)
> +{
> +}
> +
>  void dump_p2m_lookup(struct domain *d, paddr_t addr)
>  {
>      struct p2m_domain *p2m = &d->arch.p2m;
> diff --git a/xen/common/domctl.c b/xen/common/domctl.c
> index 000993f..afcd9bc 100644
> --- a/xen/common/domctl.c
> +++ b/xen/common/domctl.c
> @@ -905,10 +905,8 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
> u_domctl)
>              ret = iomem_permit_access(d, mfn, mfn + nr_mfns - 1);
>          else
>              ret = iomem_deny_access(d, mfn, mfn + nr_mfns - 1);
> -#ifdef CONFIG_X86
>          if ( !ret )
>              memory_type_changed(d);
> -#endif
>      }
>      break;
>  
> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
> index 0ef396c..0ee7cb2 100644
> --- a/xen/include/asm-arm/p2m.h
> +++ b/xen/include/asm-arm/p2m.h
> @@ -5,6 +5,8 @@
>  
>  struct domain;
>  
> +extern void memory_type_changed(struct domain *);
> +
>  /* Per-p2m-table state */
>  struct p2m_domain {
>      /* Lock that protects updates to the p2m */



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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