From: Andrew Cooper Date: Fri, 10 Jan 2020 16:06:08 +0000 (+0000) Subject: x86/boot: Rename l?_identmap to l?_directmap X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~893 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=24adcd42e8d9229964d7613d6da2059ecb30ab61;p=xen.git x86/boot: Rename l?_identmap to l?_directmap Since c/s faa85d4fb3 "x86/boot: Don't map 0 during boot", l1_identmap no longer has an alias mapped at 0, meaning that none of the l?_identmap[] pagetables are actually an identity map. Rename them to l?_directmap, which avoids any kind of implication that they might be mapped at 0. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index d246e374f1..aaf0e119db 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -678,7 +678,7 @@ trampoline_setup: shr $(L2_PAGETABLE_SHIFT-3),%ebx mov $8,%ecx 1: mov %eax,sym_fs(l2_bootmap)-8(%ebx,%ecx,8) - mov %eax,sym_fs(l2_identmap)-8(%ebx,%ecx,8) + mov %eax,sym_fs(l2_directmap)-8(%ebx,%ecx,8) sub $(1<> L2_PAGETABLE_SHIFT) + i; paddr_t addr = slot << L2_PAGETABLE_SHIFT; - l2_identmap[slot] = l2e_from_paddr(addr, PAGE_HYPERVISOR|_PAGE_PSE); + l2_directmap[slot] = l2e_from_paddr(addr, PAGE_HYPERVISOR|_PAGE_PSE); l2_bootmap[slot] = l2e_from_paddr(addr, __PAGE_HYPERVISOR|_PAGE_PSE); } } diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 1b6ca4a47d..5bdc229bd6 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1031,7 +1031,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) for ( i = boot_e820.nr_map-1; i >= 0; i-- ) { uint64_t s, e, mask = (1UL << L2_PAGETABLE_SHIFT) - 1; - uint64_t end, limit = ARRAY_SIZE(l2_identmap) << L2_PAGETABLE_SHIFT; + uint64_t end, limit = ARRAY_SIZE(l2_directmap) << L2_PAGETABLE_SHIFT; if ( boot_e820.map[i].type != E820_RAM ) continue; @@ -1136,7 +1136,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) /* The only data mappings to be relocated are in the Xen area. */ pl2e = __va(__pa(l2_xenmap)); /* - * Undo the temporary-hooking of the l1_identmap. __2M_text_start + * Undo the temporary-hooking of the l1_directmap. __2M_text_start * is contained in this PTE. */ BUG_ON(using_2M_mapping() && @@ -1349,7 +1349,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) /* Need to create mappings above PREBUILT_MAP_LIMIT. */ map_s = max_t(uint64_t, s, PREBUILT_MAP_LIMIT); map_e = min_t(uint64_t, e, - ARRAY_SIZE(l2_identmap) << L2_PAGETABLE_SHIFT); + ARRAY_SIZE(l2_directmap) << L2_PAGETABLE_SHIFT); /* Pass mapped memory to allocator /before/ creating new mappings. */ init_boot_pages(s, min(map_s, e)); diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h index 05a8b1efa6..4b9a4fa33f 100644 --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -293,7 +293,7 @@ extern unsigned int m2p_compat_vstart; extern l2_pgentry_t l2_xenmap[L2_PAGETABLE_ENTRIES], l2_bootmap[4*L2_PAGETABLE_ENTRIES]; extern l3_pgentry_t l3_bootmap[L3_PAGETABLE_ENTRIES]; -extern l2_pgentry_t l2_identmap[4*L2_PAGETABLE_ENTRIES]; +extern l2_pgentry_t l2_directmap[4*L2_PAGETABLE_ENTRIES]; extern l1_pgentry_t l1_fixmap[L1_PAGETABLE_ENTRIES]; void paging_init(void); void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t);