At the same time remove the useless user mode pair of init_level4_pgt.
-Index: head-2008-12-01/arch/x86/kernel/cpu/common_64-xen.c
-===================================================================
---- head-2008-12-01.orig/arch/x86/kernel/cpu/common_64-xen.c 2008-12-01 12:13:15.000000000 +0100
-+++ head-2008-12-01/arch/x86/kernel/cpu/common_64-xen.c 2008-12-01 12:13:27.000000000 +0100
+--- sle11-2009-04-09.orig/arch/x86/kernel/cpu/common_64-xen.c 2008-11-17 14:07:10.000000000 +0100
++++ sle11-2009-04-09/arch/x86/kernel/cpu/common_64-xen.c 2009-03-16 16:40:52.000000000 +0100
@@ -530,8 +530,7 @@ static void __init_refok switch_pt(int c
#ifdef CONFIG_XEN
if (cpu == 0)
#endif
}
-Index: head-2008-12-01/arch/x86/kernel/head_64-xen.S
-===================================================================
---- head-2008-12-01.orig/arch/x86/kernel/head_64-xen.S 2008-12-01 11:49:07.000000000 +0100
-+++ head-2008-12-01/arch/x86/kernel/head_64-xen.S 2008-12-01 12:13:27.000000000 +0100
+--- sle11-2009-04-09.orig/arch/x86/kernel/head_64-xen.S 2009-03-16 16:38:16.000000000 +0100
++++ sle11-2009-04-09/arch/x86/kernel/head_64-xen.S 2009-03-16 16:40:52.000000000 +0100
@@ -44,14 +44,6 @@ ENTRY(name)
NEXT_PAGE(init_level4_pgt)
NEXT_PAGE(level3_kernel_pgt)
.fill 512,8,0
-Index: head-2008-12-01/arch/x86/mm/hypervisor.c
-===================================================================
---- head-2008-12-01.orig/arch/x86/mm/hypervisor.c 2008-12-01 12:13:22.000000000 +0100
-+++ head-2008-12-01/arch/x86/mm/hypervisor.c 2008-12-01 12:13:27.000000000 +0100
-@@ -422,7 +422,7 @@ void xen_l3_entry_update(pud_t *ptr, pud
+--- sle11-2009-04-09.orig/arch/x86/mm/hypervisor.c 2009-03-16 16:40:50.000000000 +0100
++++ sle11-2009-04-09/arch/x86/mm/hypervisor.c 2009-03-30 12:19:20.000000000 +0200
+@@ -423,7 +423,7 @@ void xen_l3_entry_update(pud_t *ptr, pud
#endif
#ifdef CONFIG_X86_64
{
mmu_update_t u[2];
struct page *page = NULL;
-@@ -435,8 +435,10 @@ void xen_l4_entry_update(pgd_t *ptr, int
+@@ -436,8 +436,10 @@ void xen_l4_entry_update(pgd_t *ptr, int
}
u[0].ptr = virt_to_machine(ptr);
u[0].val = __pgd_val(val);
u[1].val = __pgd_val(val);
do_lN_entry_update(u, 2, page);
} else
-@@ -444,21 +446,25 @@ void xen_l4_entry_update(pgd_t *ptr, int
+@@ -445,21 +447,25 @@ void xen_l4_entry_update(pgd_t *ptr, int
}
#endif /* CONFIG_X86_64 */
void xen_tlb_flush(void)
{
-@@ -526,28 +532,38 @@ void xen_invlpg_mask(cpumask_t *mask, un
+@@ -529,28 +535,38 @@ void xen_invlpg_mask(cpumask_t *mask, un
void xen_pgd_pin(pgd_t *pgd)
{
struct mmuext_op op[NR_PGD_PIN_OPS];
BUG();
}
-Index: head-2008-12-01/arch/x86/mm/init_64-xen.c
-===================================================================
---- head-2008-12-01.orig/arch/x86/mm/init_64-xen.c 2008-12-01 12:13:22.000000000 +0100
-+++ head-2008-12-01/arch/x86/mm/init_64-xen.c 2008-12-01 12:13:27.000000000 +0100
-@@ -604,9 +604,6 @@ void __init xen_init_pt(void)
+--- sle11-2009-04-09.orig/arch/x86/mm/init_64-xen.c 2009-03-16 16:40:50.000000000 +0100
++++ sle11-2009-04-09/arch/x86/mm/init_64-xen.c 2009-03-16 16:40:52.000000000 +0100
+@@ -616,9 +616,6 @@ void __init xen_init_pt(void)
__pud(__pa_symbol(level2_kernel_pgt) | _PAGE_TABLE);
memcpy(level2_kernel_pgt, page, PAGE_SIZE);
/* Do an early initialization of the fixmap area. */
addr = __fix_to_virt(FIX_EARLYCON_MEM_BASE);
level3_kernel_pgt[pud_index(addr)] =
-@@ -616,8 +613,6 @@ void __init xen_init_pt(void)
+@@ -628,8 +625,6 @@ void __init xen_init_pt(void)
early_make_page_readonly(init_level4_pgt,
XENFEAT_writable_page_tables);
early_make_page_readonly(level3_kernel_pgt,
XENFEAT_writable_page_tables);
early_make_page_readonly(level3_user_pgt,
-Index: head-2008-12-01/arch/x86/mm/pgtable-xen.c
-===================================================================
---- head-2008-12-01.orig/arch/x86/mm/pgtable-xen.c 2008-12-01 12:13:22.000000000 +0100
-+++ head-2008-12-01/arch/x86/mm/pgtable-xen.c 2008-12-01 12:13:27.000000000 +0100
+--- sle11-2009-04-09.orig/arch/x86/mm/pgtable-xen.c 2009-03-16 16:40:50.000000000 +0100
++++ sle11-2009-04-09/arch/x86/mm/pgtable-xen.c 2009-04-09 14:54:18.000000000 +0200
@@ -270,9 +270,11 @@ static void pgd_walk(pgd_t *pgd_base, pg
BUG();
seq = 0;
0);
MULTI_update_va_mapping(mcl + seq + 1,
(unsigned long)pgd_base,
-@@ -658,12 +660,29 @@ static void pgd_prepopulate_pmd(struct m
+@@ -662,12 +664,29 @@ static void pgd_prepopulate_pmd(struct m
}
}
pgd_t *pgd_alloc(struct mm_struct *mm)
{
-@@ -671,7 +690,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+@@ -675,7 +694,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
pmd_t *pmds[PREALLOCATED_PMDS];
unsigned long flags;
if (pgd == NULL)
goto out;
-@@ -710,7 +729,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+@@ -714,7 +733,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
out_free_pmds:
free_pmds(pmds, mm, !xen_feature(XENFEAT_pae_pgdir_above_4gb));
out_free_pgd:
out:
return NULL;
}
-@@ -729,7 +749,8 @@ void pgd_free(struct mm_struct *mm, pgd_
+@@ -733,7 +753,8 @@ void pgd_free(struct mm_struct *mm, pgd_
pgd_mop_up_pmds(mm, pgd);
paravirt_pgd_free(mm, pgd);
}
/* blktap and gntdev need this, as otherwise they would implicitly (and
-Index: head-2008-12-01/drivers/xen/core/machine_reboot.c
-===================================================================
---- head-2008-12-01.orig/drivers/xen/core/machine_reboot.c 2008-12-01 12:13:13.000000000 +0100
-+++ head-2008-12-01/drivers/xen/core/machine_reboot.c 2008-12-01 12:13:27.000000000 +0100
-@@ -199,8 +199,7 @@ static int take_machine_down(void *_susp
+--- sle11-2009-04-09.orig/drivers/xen/core/machine_reboot.c 2009-02-17 12:25:29.000000000 +0100
++++ sle11-2009-04-09/drivers/xen/core/machine_reboot.c 2009-03-16 16:40:52.000000000 +0100
+@@ -191,8 +191,7 @@ static int take_machine_down(void *_susp
* in fast-suspend mode as that implies a new enough Xen.
*/
if (!suspend->fast_suspend)
#endif
}
-Index: head-2008-12-01/include/asm-x86/mach-xen/asm/hypervisor.h
-===================================================================
---- head-2008-12-01.orig/include/asm-x86/mach-xen/asm/hypervisor.h 2008-12-01 12:13:22.000000000 +0100
-+++ head-2008-12-01/include/asm-x86/mach-xen/asm/hypervisor.h 2008-12-01 12:13:27.000000000 +0100
+--- sle11-2009-04-09.orig/include/asm-x86/mach-xen/asm/hypervisor.h 2009-03-16 16:40:50.000000000 +0100
++++ sle11-2009-04-09/include/asm-x86/mach-xen/asm/hypervisor.h 2009-03-16 16:40:52.000000000 +0100
@@ -85,8 +85,8 @@ void do_hypervisor_callback(struct pt_re
* be MACHINE addresses.
*/
void xen_pgd_pin(pgd_t *);
void xen_pgd_unpin(pgd_t *);
-Index: head-2008-12-01/include/asm-x86/mach-xen/asm/mmu_context_64.h
-===================================================================
---- head-2008-12-01.orig/include/asm-x86/mach-xen/asm/mmu_context_64.h 2008-12-01 11:49:07.000000000 +0100
-+++ head-2008-12-01/include/asm-x86/mach-xen/asm/mmu_context_64.h 2008-12-01 12:13:27.000000000 +0100
+--- sle11-2009-04-09.orig/include/asm-x86/mach-xen/asm/mmu_context_64.h 2009-03-16 16:38:16.000000000 +0100
++++ sle11-2009-04-09/include/asm-x86/mach-xen/asm/mmu_context_64.h 2009-03-16 16:40:52.000000000 +0100
@@ -46,6 +46,7 @@ static inline void switch_mm(struct mm_s
{
unsigned cpu = smp_processor_id();
load_LDT_nolock(&next->context);
}
}
-Index: head-2008-12-01/include/asm-x86/mach-xen/asm/pgalloc.h
-===================================================================
---- head-2008-12-01.orig/include/asm-x86/mach-xen/asm/pgalloc.h 2008-12-01 12:13:06.000000000 +0100
-+++ head-2008-12-01/include/asm-x86/mach-xen/asm/pgalloc.h 2008-12-01 12:13:27.000000000 +0100
+--- sle11-2009-04-09.orig/include/asm-x86/mach-xen/asm/pgalloc.h 2009-03-16 16:40:37.000000000 +0100
++++ sle11-2009-04-09/include/asm-x86/mach-xen/asm/pgalloc.h 2009-03-16 16:40:52.000000000 +0100
@@ -106,15 +106,13 @@ static inline void pud_populate(struct m
#endif /* CONFIG_X86_PAE */
else
*__user_pgd(pgd) = *pgd = ent;
}
-Index: head-2008-12-01/include/asm-x86/mach-xen/asm/pgtable_64.h
-===================================================================
---- head-2008-12-01.orig/include/asm-x86/mach-xen/asm/pgtable_64.h 2008-12-01 12:13:13.000000000 +0100
-+++ head-2008-12-01/include/asm-x86/mach-xen/asm/pgtable_64.h 2008-12-01 12:13:27.000000000 +0100
+--- sle11-2009-04-09.orig/include/asm-x86/mach-xen/asm/pgtable_64.h 2009-03-16 16:40:37.000000000 +0100
++++ sle11-2009-04-09/include/asm-x86/mach-xen/asm/pgtable_64.h 2009-03-16 16:40:52.000000000 +0100
@@ -131,18 +131,25 @@ static inline void xen_set_pud(pud_t *pu
: (void)(*__pudp = xen_make_pud(0)); \
})