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

Re: [Xen-devel] [PATCH] xen: arm: implement domain_page_map_to_mfn



>>> On 28.01.13 at 14:09, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
> This was recently (re?)introduced on x86 in 26447:f831d8dcf18f and is
> now used in generic code (specifically tmem in 26454:38847c15d8cd).
> 
> This fixes the build on ARM.

I'm sorry for that; me not noticing was caused by working on a
tree where the ARM build was already broken before those
patches.

Which reminds me: IanJ - any chance of introducing a build-only
(for the time being) test for ARM?

Jan

> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Jan Beulich <JBeulich@xxxxxxxx>
> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> Cc: Tim Deegan <tim@xxxxxxx>
> ---
>  xen/arch/arm/mm.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index 9c5c334..7621d1b 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -208,6 +208,18 @@ void unmap_domain_page(const void *va)
>      local_irq_restore(flags);
>  }
>  
> +unsigned long domain_page_map_to_mfn(const void *va)
> +{
> +    lpae_t *map = xen_second + second_linear_offset(DOMHEAP_VIRT_START);
> +    int slot = ((unsigned long) va - DOMHEAP_VIRT_START) >> SECOND_SHIFT;
> +    unsigned long offset = ((unsigned long)va>>THIRD_SHIFT) & 
> LPAE_ENTRY_MASK;
> +
> +    ASSERT(slot >= 0 && slot < DOMHEAP_ENTRIES);
> +    ASSERT(map[slot].pt.avail != 0);
> +
> +    return map[slot].pt.base + offset;
> +}
> +
>  void __init arch_init_memory(void)
>  {
>      /*
> -- 
> 1.7.9.1




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