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

Re: [Xen-devel] [PATCH v2 2/3] xen/arm: update page table walk to handle 4 level page table



On Tue, 2014-05-27 at 12:16 +0530, vijay.kilari@xxxxxxxxx wrote:
> From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
> 
> ARM64 supports 4-level page tables. Update page
> table walk function to handle 4 levels
> 
> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> ---
>  xen/arch/arm/mm.c |   19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index 04e3182..ef3c53e 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -162,13 +162,25 @@ static inline void 
> check_memory_layout_alignment_constraints(void) {
>  #endif
>  }
>  
> -void dump_pt_walk(lpae_t *first, paddr_t addr)
> +void dump_pt_walk(lpae_t *root, paddr_t addr)
>  {
>      lpae_t *second = NULL, *third = NULL;
> +    lpae_t *first = NULL;
> +#ifdef CONFIG_ARM_64
> +    if ( zeroeth_table_offset(addr) >= LPAE_ENTRIES )
> +        return;
>  
> +    printk("0TH[0x%x] = 0x%"PRIpaddr"\n", zeroeth_table_offset(addr),
> +           root[zeroeth_table_offset(addr)].bits);
> +    if ( !root[zeroeth_table_offset(addr)].walk.valid )
> +        goto done;
> +
> +    first = map_domain_page(root[zeroeth_table_offset(addr)].walk.base);
> +#else
> +    first = root;
>      if ( first_table_offset(addr) >= LPAE_ENTRIES )
>          return;
> -
> +#endif
>      printk("1ST[0x%x] = 0x%"PRIpaddr"\n", first_table_offset(addr),
>             first[first_table_offset(addr)].bits);
>      if ( !first[first_table_offset(addr)].walk.valid ||
> @@ -189,6 +201,9 @@ void dump_pt_walk(lpae_t *first, paddr_t addr)
>  done:
>      if (third) unmap_domain_page(third);
>      if (second) unmap_domain_page(second);
> +#ifdef CONFIG_ARM_64
> +    if ( first ) unmap_domain_page(first);
> +#endif
>  
>  }
>  



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