[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [mini-os master] mini-os: add static page tables for virtual kernel area for HVMlite
commit 21a6da9c1e40b78d4ab872ed331cd8c77b9f1bf7 Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Thu Aug 18 13:00:27 2016 +0200 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Wed Aug 24 11:37:05 2016 +0100 mini-os: add static page tables for virtual kernel area for HVMlite 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 -- generated by git-patchbot for /home/xen/git/mini-os.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |