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

Re: [Minios-devel] [PATCH 11/22] mini-os: add static page tables for virtual kernel area for HVMlite



Juergen Gross, on Tue 23 Aug 2016 17:15:57 +0200, wrote:
> In HVMlite mode we need the virtual kernel area for mapping of the
> console and xenbus ring pages as especially on 32 bit architecture
> their pfns might be above the supported maximum memory size.
> 
> Add the page tables needed for doing the mapping.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  arch/x86/mm.c     | 11 +++++++++++
>  arch/x86/x86_64.S |  7 +++++++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/arch/x86/mm.c b/arch/x86/mm.c
> index 0543017..cbb5617 100644
> --- a/arch/x86/mm.c
> +++ b/arch/x86/mm.c
> @@ -733,6 +733,17 @@ void arch_init_mm(unsigned long* start_pfn_p, unsigned 
> long* max_pfn_p)
>  
>      *start_pfn_p = start_pfn;
>      *max_pfn_p = max_pfn;
> +
> +#ifndef CONFIG_PARAVIRT
> +#ifdef __x86_64__
> +    BUILD_BUG_ON(l4_table_offset(VIRT_KERNEL_AREA) != 1 ||
> +                 l3_table_offset(VIRT_KERNEL_AREA) != 0 ||
> +                 l2_table_offset(VIRT_KERNEL_AREA) != 0);
> +#else
> +    BUILD_BUG_ON(l3_table_offset(VIRT_KERNEL_AREA) != 0 ||
> +                 l2_table_offset(VIRT_KERNEL_AREA) == 0);
> +#endif
> +#endif
>  }
>  
>  grant_entry_t *arch_init_gnttab(int nr_grant_frames)
> diff --git a/arch/x86/x86_64.S b/arch/x86/x86_64.S
> index 17a9ead..5932bfb 100644
> --- a/arch/x86/x86_64.S
> +++ b/arch/x86/x86_64.S
> @@ -418,10 +418,17 @@ ENTRY(__arch_switch_threads)
>  .data
>  .globl page_table_base
>          .align __PAGE_SIZE
> +page_table_virt_l2:
> +        PTE(page_table_virt_l1 + L2_PROT)
> +        .align __PAGE_SIZE, 0
> +page_table_virt_l3:
> +        PTE(page_table_virt_l2 + L3_PROT)
> +        .align __PAGE_SIZE, 0
>  page_table_l3:
>          PTE(page_table_l2 + L3_PROT)
>          .align __PAGE_SIZE, 0
>  page_table_base:
>          PTE(page_table_l3 + L4_PROT)
> +        PTE(page_table_virt_l3 + L4_PROT)
>          .align __PAGE_SIZE, 0
>  #endif
> -- 
> 2.6.6
> 

-- 
Samuel
<A> sauf que le firewall bloque tout sauf internet
 -+- ben ouais, il bloque ipx/spx ! -+-

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

 


Rackspace

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