ia64/xen-unstable

changeset 8674:4be553bcfb0f

Rename funtions
early_make_page_readonly() (x86/64)
make_lowmem_page_readonly() (x86/32)
make_page_readonly() (x86)
make_pages_readonly() (x86)
make_page_writable() (x86)
make_pages_writable() (x86)
to
early_make_mmu_page_readonly()
make_lowmem_mmu_page_readonly()
make_mmu_page_readonly()
make_mmu_pages_readonly()
make_mmu_page_writable()
make_mmu_pages_writable()

These functions are only called by LDT, GDT or page table page
construction, initialisation and destruction functions and in the
future they will behave in a MMU page specific manner.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
Index: xen-features/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h 2006-01-27 10:56:59.000000000 +0000
@@ -413,19 +413,19 @@
} while (0)

#ifndef CONFIG_XEN_SHADOW_MODE
-void make_lowmem_page_readonly(void *va);
-void make_lowmem_page_writable(void *va);
-void make_page_readonly(void *va);
-void make_page_writable(void *va);
-void make_pages_readonly(void *va, unsigned int nr);
-void make_pages_writable(void *va, unsigned int nr);
+void make_lowmem_mmu_page_readonly(void *va);
+void make_lowmem_mmu_page_writable(void *va);
+void make_mmu_page_readonly(void *va);
+void make_mmu_page_writable(void *va);
+void make_mmu_pages_readonly(void *va, unsigned int nr);
+void make_mmu_pages_writable(void *va, unsigned int nr);
#else
-#define make_lowmem_page_readonly(_va) ((void)0)
-#define make_lowmem_page_writable(_va) ((void)0)
-#define make_page_readonly(_va) ((void)0)
-#define make_page_writable(_va) ((void)0)
-#define make_pages_readonly(_va, _nr) ((void)0)
-#define make_pages_writable(_va, _nr) ((void)0)
+#define make_lowmem_mmu_page_readonly(_va) ((void)0)
+#define make_lowmem_mmu_page_writable(_va) ((void)0)
+#define make_mmu_page_readonly(_va) ((void)0)
+#define make_mmu_page_writable(_va) ((void)0)
+#define make_mmu_pages_readonly(_va, _nr) ((void)0)
+#define make_mmu_pages_writable(_va, _nr) ((void)0)
#endif

#define virt_to_ptep(__va) \
Index: xen-features/linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c 2006-01-27 10:18:19.000000000 +0000
@@ -572,7 +572,7 @@
va < gdt_descr->address + gdt_descr->size;
va += PAGE_SIZE, f++) {
frames[f] = virt_to_mfn(va);
- make_lowmem_page_readonly((void *)va);
+ make_lowmem_mmu_page_readonly((void *)va);
}
if (HYPERVISOR_set_gdt(frames, gdt_descr->size / 8))
BUG();
Index: xen-features/linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c 2006-01-27 10:56:59.000000000 +0000
@@ -59,8 +59,8 @@
cpumask_t mask;
preempt_disable();
#endif
- make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
- PAGE_SIZE);
+ make_mmu_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
#ifdef CONFIG_SMP
mask = cpumask_of_cpu(smp_processor_id());
@@ -70,7 +70,7 @@
#endif
}
if (oldsize) {
- make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
+ make_mmu_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
PAGE_SIZE);
if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
vfree(oldldt);
@@ -86,8 +86,8 @@
if (err < 0)
return err;
memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
- make_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
- PAGE_SIZE);
+ make_mmu_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
return 0;
}

@@ -119,9 +119,9 @@
if (mm->context.size) {
if (mm == current->active_mm)
clear_LDT();
- make_pages_writable(mm->context.ldt,
- (mm->context.size * LDT_ENTRY_SIZE) /
- PAGE_SIZE);
+ make_mmu_pages_writable(mm->context.ldt,
+ (mm->context.size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
vfree(mm->context.ldt);
else
Index: xen-features/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c 2006-01-27 10:18:19.000000000 +0000
@@ -68,7 +68,7 @@

#ifdef CONFIG_X86_PAE
pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
- make_lowmem_page_readonly(pmd_table);
+ make_lowmem_mmu_page_readonly(pmd_table);
set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
pud = pud_offset(pgd, 0);
if (pmd_table != pmd_offset(pud, 0))
@@ -89,7 +89,7 @@
{
if (pmd_none(*pmd)) {
pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
- make_lowmem_page_readonly(page_table);
+ make_lowmem_mmu_page_readonly(page_table);
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
if (page_table != pte_offset_kernel(pmd, 0))
BUG();
Index: xen-features/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c 2006-01-27 11:01:11.000000000 +0000
@@ -198,7 +198,7 @@
{
pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
if (pte)
- make_lowmem_page_readonly(pte);
+ make_lowmem_mmu_page_readonly(pte);
return pte;
}

@@ -344,7 +344,7 @@
pmd_t *kpmd = pmd_offset(kpud, v);
pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
memcpy(pmd, kpmd, PAGE_SIZE);
- make_lowmem_page_readonly(pmd);
+ make_lowmem_mmu_page_readonly(pmd);
}
pgd_list_add(pgd);
spin_unlock_irqrestore(&pgd_lock, flags);
@@ -378,7 +378,7 @@
spin_unlock_irqrestore(&pgd_lock, flags);
for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
- make_lowmem_page_writable(pmd);
+ make_lowmem_mmu_page_writable(pmd);
memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
kmem_cache_free(pmd_cache, pmd);
}
@@ -389,7 +389,7 @@
}

#ifndef CONFIG_XEN_SHADOW_MODE
-void make_lowmem_page_readonly(void *va)
+void make_lowmem_mmu_page_readonly(void *va)
{
pte_t *pte = virt_to_ptep(va);
int rc = HYPERVISOR_update_va_mapping(
@@ -397,7 +397,7 @@
BUG_ON(rc);
}

-void make_lowmem_page_writable(void *va)
+void make_lowmem_mmu_page_writable(void *va)
{
pte_t *pte = virt_to_ptep(va);
int rc = HYPERVISOR_update_va_mapping(
@@ -405,7 +405,7 @@
BUG_ON(rc);
}

-void make_page_readonly(void *va)
+void make_mmu_page_readonly(void *va)
{
pte_t *pte = virt_to_ptep(va);
int rc = HYPERVISOR_update_va_mapping(
@@ -419,12 +419,12 @@
kmap_flush_unused(); /* flush stale writable kmaps */
else
#endif
- make_lowmem_page_readonly(
+ make_lowmem_mmu_page_readonly(
phys_to_virt(pfn << PAGE_SHIFT));
}
}

-void make_page_writable(void *va)
+void make_mmu_page_writable(void *va)
{
pte_t *pte = virt_to_ptep(va);
int rc = HYPERVISOR_update_va_mapping(
@@ -436,23 +436,23 @@
#ifdef CONFIG_HIGHMEM
if (pfn < highstart_pfn)
#endif
- make_lowmem_page_writable(
+ make_lowmem_mmu_page_writable(
phys_to_virt(pfn << PAGE_SHIFT));
}
}

-void make_pages_readonly(void *va, unsigned int nr)
+void make_mmu_pages_readonly(void *va, unsigned int nr)
{
while (nr-- != 0) {
- make_page_readonly(va);
+ make_mmu_page_readonly(va);
va = (void *)((unsigned long)va + PAGE_SIZE);
}
}

-void make_pages_writable(void *va, unsigned int nr)
+void make_mmu_pages_writable(void *va, unsigned int nr)
{
while (nr-- != 0) {
- make_page_writable(va);
+ make_mmu_page_writable(va);
va = (void *)((unsigned long)va + PAGE_SIZE);
}
}
Index: xen-features/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c 2006-01-27 10:18:19.000000000 +0000
@@ -239,7 +239,7 @@
memcpy((void *)cpu_gdt_descr[cpu].address,
(void *)cpu_gdt_descr[0].address,
cpu_gdt_descr[0].size);
- make_page_readonly((void *)cpu_gdt_descr[cpu].address);
+ make_mmu_page_readonly((void *)cpu_gdt_descr[cpu].address);

cpu_set(cpu, cpu_possible_map);
#ifdef CONFIG_HOTPLUG_CPU
Index: xen-features/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c 2006-01-27 10:56:59.000000000 +0000
@@ -65,8 +65,8 @@

preempt_disable();
#endif
- make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
- PAGE_SIZE);
+ make_mmu_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
#ifdef CONFIG_SMP
mask = cpumask_of_cpu(smp_processor_id());
@@ -76,7 +76,7 @@
#endif
}
if (oldsize) {
- make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
+ make_mmu_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
PAGE_SIZE);
if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
vfree(oldldt);
@@ -92,8 +92,8 @@
if (err < 0)
return err;
memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
- make_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
- PAGE_SIZE);
+ make_mmu_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
return 0;
}

@@ -131,9 +131,9 @@
if (mm->context.size) {
if (mm == current->active_mm)
clear_LDT();
- make_pages_writable(mm->context.ldt,
- (mm->context.size * LDT_ENTRY_SIZE) /
- PAGE_SIZE);
+ make_mmu_pages_writable(mm->context.ldt,
+ (mm->context.size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
vfree(mm->context.ldt);
else
Index: xen-features/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c 2006-01-27 10:18:19.000000000 +0000
@@ -141,7 +141,7 @@
va < gdt_descr->address + gdt_descr->size;
va += PAGE_SIZE, f++) {
frames[f] = virt_to_mfn(va);
- make_page_readonly((void *)va);
+ make_mmu_page_readonly((void *)va);
}
if (HYPERVISOR_set_gdt(frames, gdt_descr->size /
sizeof (struct desc_struct)))
Index: xen-features/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c 2006-01-27 11:01:11.000000000 +0000
@@ -66,7 +66,7 @@
(((mfn_to_pfn((addr) >> PAGE_SHIFT)) << PAGE_SHIFT) + \
__START_KERNEL_map)))

-static void early_make_page_readonly(void *va)
+static void early_make_mmu_page_readonly(void *va)
{
unsigned long addr, _va = (unsigned long)va;
pte_t pte, *ptep;
@@ -88,7 +88,7 @@
BUG();
}

-void make_page_readonly(void *va)
+void make_mmu_page_readonly(void *va)
{
pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t pte, *ptep;
unsigned long addr = (unsigned long) va;
@@ -103,10 +103,10 @@
xen_l1_entry_update(ptep, pte); /* fallback */

if ((addr >= VMALLOC_START) && (addr < VMALLOC_END))
- make_page_readonly(__va(pte_pfn(pte) << PAGE_SHIFT));
+ make_mmu_page_readonly(__va(pte_pfn(pte) << PAGE_SHIFT));
}

-void make_page_writable(void *va)
+void make_mmu_page_writable(void *va)
{
pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t pte, *ptep;
unsigned long addr = (unsigned long) va;
@@ -121,21 +121,21 @@
xen_l1_entry_update(ptep, pte); /* fallback */

if ((addr >= VMALLOC_START) && (addr < VMALLOC_END))
- make_page_writable(__va(pte_pfn(pte) << PAGE_SHIFT));
+ make_mmu_page_writable(__va(pte_pfn(pte) << PAGE_SHIFT));
}

-void make_pages_readonly(void *va, unsigned nr)
+void make_mmu_pages_readonly(void *va, unsigned nr)
{
while (nr-- != 0) {
- make_page_readonly(va);
+ make_mmu_page_readonly(va);
va = (void*)((unsigned long)va + PAGE_SIZE);
}
}

-void make_pages_writable(void *va, unsigned nr)
+void make_mmu_pages_writable(void *va, unsigned nr)
{
while (nr-- != 0) {
- make_page_writable(va);
+ make_mmu_page_writable(va);
va = (void*)((unsigned long)va + PAGE_SIZE);
}
}
@@ -223,7 +223,7 @@
pud = (user_mode ? pud_offset_u(vaddr) : pud_offset(pgd, vaddr));
if (pud_none(*pud)) {
pmd = (pmd_t *) spp_getpage();
- make_page_readonly(pmd);
+ make_mmu_page_readonly(pmd);
xen_pmd_pin(__pa(pmd));
set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
if (pmd != pmd_offset(pud, 0)) {
@@ -234,7 +234,7 @@
pmd = pmd_offset(pud, vaddr);
if (pmd_none(*pmd)) {
pte = (pte_t *) spp_getpage();
- make_page_readonly(pte);
+ make_mmu_page_readonly(pte);
xen_pte_pin(__pa(pte));
set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
if (pte != pte_offset_kernel(pmd, 0)) {
@@ -276,7 +276,7 @@
if (pud_none(*pud)) {

pmd = (pmd_t *) spp_getpage();
- make_page_readonly(pmd);
+ make_mmu_page_readonly(pmd);
xen_pmd_pin(__pa(pmd));

set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
@@ -290,7 +290,7 @@

if (pmd_none(*pmd)) {
pte = (pte_t *) spp_getpage();
- make_page_readonly(pte);
+ make_mmu_page_readonly(pte);
xen_pte_pin(__pa(pte));

set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
@@ -419,7 +419,7 @@
}

pmd = alloc_static_page(&pmd_phys);
- early_make_page_readonly(pmd);
+ early_make_mmu_page_readonly(pmd);
xen_pmd_pin(pmd_phys);
set_pud(pud, __pud(pmd_phys | _KERNPG_TABLE));
for (j = 0; j < PTRS_PER_PMD; pmd++, j++) {
@@ -448,7 +448,7 @@
__set_pte(pte, __pte(paddr | _KERNPG_TABLE));
}
pte = pte_save;
- early_make_page_readonly(pte);
+ early_make_mmu_page_readonly(pte);
xen_pte_pin(pte_phys);
set_pmd(pmd, __pmd(pte_phys | _KERNPG_TABLE));
}
@@ -497,11 +497,11 @@
_KERNPG_TABLE | _PAGE_USER);
memcpy((void *)level2_kernel_pgt, page, PAGE_SIZE);

- early_make_page_readonly(init_level4_pgt);
- early_make_page_readonly(init_level4_user_pgt);
- early_make_page_readonly(level3_kernel_pgt);
- early_make_page_readonly(level3_user_pgt);
- early_make_page_readonly(level2_kernel_pgt);
+ early_make_mmu_page_readonly(init_level4_pgt);
+ early_make_mmu_page_readonly(init_level4_user_pgt);
+ early_make_mmu_page_readonly(level3_kernel_pgt);
+ early_make_mmu_page_readonly(level3_user_pgt);
+ early_make_mmu_page_readonly(level2_kernel_pgt);

xen_pgd_pin(__pa_symbol(init_level4_pgt));
xen_pgd_pin(__pa_symbol(init_level4_user_pgt));
@@ -539,7 +539,7 @@
pmd = (pmd_t *)&page[pmd_index(va)];
if (pmd_none(*pmd)) {
pte_page = alloc_static_page(&phys);
- early_make_page_readonly(pte_page);
+ early_make_mmu_page_readonly(pte_page);
xen_pte_pin(phys);
set_pmd(pmd, __pmd(phys | _KERNPG_TABLE | _PAGE_USER));
} else {
@@ -586,7 +586,7 @@
for (; start < end; start = next) {
unsigned long pud_phys;
pud_t *pud = alloc_static_page(&pud_phys);
- early_make_page_readonly(pud);
+ early_make_mmu_page_readonly(pud);
xen_pud_pin(pud_phys);
next = start + PGDIR_SIZE;
if (next > end)
@@ -791,11 +791,11 @@
set_page_count(virt_to_page(addr), 1);
memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE);
xen_pte_unpin(__pa(addr));
- make_page_writable(__va(__pa(addr)));
+ make_mmu_page_writable(__va(__pa(addr)));
/*
* Make pages from __PAGE_OFFSET address as well
*/
- make_page_writable((void *)addr);
+ make_mmu_page_writable((void *)addr);
free_page(addr);
totalram_pages++;
}
Index: xen-features/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgalloc.h
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgalloc.h 2006-01-27 10:18:17.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgalloc.h 2006-01-27 10:56:59.000000000 +0000
@@ -7,10 +7,10 @@
#include <linux/mm.h>
#include <asm/io.h> /* for phys_to_virt and page_to_pseudophys */

-void make_page_readonly(void *va);
-void make_page_writable(void *va);
-void make_pages_readonly(void *va, unsigned int nr);
-void make_pages_writable(void *va, unsigned int nr);
+void make_mmu_page_readonly(void *va);
+void make_mmu_page_writable(void *va);
+void make_mmu_pages_readonly(void *va, unsigned int nr);
+void make_mmu_pages_writable(void *va, unsigned int nr);

#define __user_pgd(pgd) ((pgd) + PTRS_PER_PGD)

@@ -161,7 +161,7 @@
{
pte_t *pte = (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
if (pte)
- make_page_readonly(pte);
+ make_mmu_page_readonly(pte);

return pte;
}
@@ -181,7 +181,7 @@
{
BUG_ON((unsigned long)pte & (PAGE_SIZE-1));
xen_pte_unpin(__pa(pte));
- make_page_writable(pte);
+ make_mmu_page_writable(pte);
free_page((unsigned long)pte);
}

Index: xen-features/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h
===================================================================
--- xen-features.orig/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h 2006-01-27 11:01:53.000000000 +0000
+++ xen-features/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h 2006-01-27 11:02:07.000000000 +0000
@@ -42,7 +42,7 @@
static inline void pte_free_kernel(pte_t *pte)
{
free_page((unsigned long)pte);
- make_page_writable(pte);
+ make_mmu_page_writable(pte);
}

extern void pte_free(struct page *pte);
author Ian.Campbell@xensource.com
date Fri Jan 27 11:29:42 2006 +0000 (2006-01-27)
parents 5fcc346d6fe0
children 31083f13ae47
files linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c linux-2.6-xen-sparse/arch/xen/i386/mm/init.c linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgalloc.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c	Thu Jan 26 11:31:28 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c	Fri Jan 27 11:29:42 2006 +0000
     1.3 @@ -572,7 +572,7 @@ void __cpuinit cpu_gdt_init(struct Xgt_d
     1.4  	     va < gdt_descr->address + gdt_descr->size;
     1.5  	     va += PAGE_SIZE, f++) {
     1.6  		frames[f] = virt_to_mfn(va);
     1.7 -		make_lowmem_page_readonly((void *)va);
     1.8 +		make_lowmem_mmu_page_readonly((void *)va);
     1.9  	}
    1.10  	if (HYPERVISOR_set_gdt(frames, gdt_descr->size / 8))
    1.11  		BUG();
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c	Thu Jan 26 11:31:28 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c	Fri Jan 27 11:29:42 2006 +0000
     2.3 @@ -59,8 +59,8 @@ static int alloc_ldt(mm_context_t *pc, i
     2.4  		cpumask_t mask;
     2.5  		preempt_disable();
     2.6  #endif
     2.7 -		make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
     2.8 -				    PAGE_SIZE);
     2.9 +		make_mmu_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
    2.10 +					PAGE_SIZE);
    2.11  		load_LDT(pc);
    2.12  #ifdef CONFIG_SMP
    2.13  		mask = cpumask_of_cpu(smp_processor_id());
    2.14 @@ -70,7 +70,7 @@ static int alloc_ldt(mm_context_t *pc, i
    2.15  #endif
    2.16  	}
    2.17  	if (oldsize) {
    2.18 -		make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
    2.19 +		make_mmu_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
    2.20  			PAGE_SIZE);
    2.21  		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
    2.22  			vfree(oldldt);
    2.23 @@ -86,8 +86,8 @@ static inline int copy_ldt(mm_context_t 
    2.24  	if (err < 0)
    2.25  		return err;
    2.26  	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
    2.27 -	make_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
    2.28 -			    PAGE_SIZE);
    2.29 +	make_mmu_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
    2.30 +				PAGE_SIZE);
    2.31  	return 0;
    2.32  }
    2.33  
    2.34 @@ -119,9 +119,9 @@ void destroy_context(struct mm_struct *m
    2.35  	if (mm->context.size) {
    2.36  		if (mm == current->active_mm)
    2.37  			clear_LDT();
    2.38 -		make_pages_writable(mm->context.ldt, 
    2.39 -				    (mm->context.size * LDT_ENTRY_SIZE) /
    2.40 -				    PAGE_SIZE);
    2.41 +		make_mmu_pages_writable(mm->context.ldt,
    2.42 +					(mm->context.size * LDT_ENTRY_SIZE) /
    2.43 +					PAGE_SIZE);
    2.44  		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
    2.45  			vfree(mm->context.ldt);
    2.46  		else
     3.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Thu Jan 26 11:31:28 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Fri Jan 27 11:29:42 2006 +0000
     3.3 @@ -68,7 +68,7 @@ static pmd_t * __init one_md_table_init(
     3.4  		
     3.5  #ifdef CONFIG_X86_PAE
     3.6  	pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
     3.7 -	make_lowmem_page_readonly(pmd_table);
     3.8 +	make_lowmem_mmu_page_readonly(pmd_table);
     3.9  	set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
    3.10  	pud = pud_offset(pgd, 0);
    3.11  	if (pmd_table != pmd_offset(pud, 0)) 
    3.12 @@ -89,7 +89,7 @@ static pte_t * __init one_page_table_ini
    3.13  {
    3.14  	if (pmd_none(*pmd)) {
    3.15  		pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
    3.16 -		make_lowmem_page_readonly(page_table);
    3.17 +		make_lowmem_mmu_page_readonly(page_table);
    3.18  		set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
    3.19  		if (page_table != pte_offset_kernel(pmd, 0))
    3.20  			BUG();	
     4.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c	Thu Jan 26 11:31:28 2006 +0100
     4.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c	Fri Jan 27 11:29:42 2006 +0000
     4.3 @@ -198,7 +198,7 @@ pte_t *pte_alloc_one_kernel(struct mm_st
     4.4  {
     4.5  	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
     4.6  	if (pte)
     4.7 -		make_lowmem_page_readonly(pte);
     4.8 +		make_lowmem_mmu_page_readonly(pte);
     4.9  	return pte;
    4.10  }
    4.11  
    4.12 @@ -344,7 +344,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
    4.13  			pmd_t *kpmd = pmd_offset(kpud, v);
    4.14  			pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
    4.15  			memcpy(pmd, kpmd, PAGE_SIZE);
    4.16 -			make_lowmem_page_readonly(pmd);
    4.17 +			make_lowmem_mmu_page_readonly(pmd);
    4.18  		}
    4.19  		pgd_list_add(pgd);
    4.20  		spin_unlock_irqrestore(&pgd_lock, flags);
    4.21 @@ -378,7 +378,7 @@ void pgd_free(pgd_t *pgd)
    4.22  			spin_unlock_irqrestore(&pgd_lock, flags);
    4.23  			for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
    4.24  				pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
    4.25 -				make_lowmem_page_writable(pmd);
    4.26 +				make_lowmem_mmu_page_writable(pmd);
    4.27  				memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
    4.28  				kmem_cache_free(pmd_cache, pmd);
    4.29  			}
    4.30 @@ -389,7 +389,7 @@ void pgd_free(pgd_t *pgd)
    4.31  }
    4.32  
    4.33  #ifndef CONFIG_XEN_SHADOW_MODE
    4.34 -void make_lowmem_page_readonly(void *va)
    4.35 +void make_lowmem_mmu_page_readonly(void *va)
    4.36  {
    4.37  	pte_t *pte = virt_to_ptep(va);
    4.38  	int rc = HYPERVISOR_update_va_mapping(
    4.39 @@ -397,7 +397,7 @@ void make_lowmem_page_readonly(void *va)
    4.40  	BUG_ON(rc);
    4.41  }
    4.42  
    4.43 -void make_lowmem_page_writable(void *va)
    4.44 +void make_lowmem_mmu_page_writable(void *va)
    4.45  {
    4.46  	pte_t *pte = virt_to_ptep(va);
    4.47  	int rc = HYPERVISOR_update_va_mapping(
    4.48 @@ -405,7 +405,7 @@ void make_lowmem_page_writable(void *va)
    4.49  	BUG_ON(rc);
    4.50  }
    4.51  
    4.52 -void make_page_readonly(void *va)
    4.53 +void make_mmu_page_readonly(void *va)
    4.54  {
    4.55  	pte_t *pte = virt_to_ptep(va);
    4.56  	int rc = HYPERVISOR_update_va_mapping(
    4.57 @@ -419,12 +419,12 @@ void make_page_readonly(void *va)
    4.58  			kmap_flush_unused(); /* flush stale writable kmaps */
    4.59  		else
    4.60  #endif
    4.61 -			make_lowmem_page_readonly(
    4.62 +			make_lowmem_mmu_page_readonly(
    4.63  				phys_to_virt(pfn << PAGE_SHIFT)); 
    4.64  	}
    4.65  }
    4.66  
    4.67 -void make_page_writable(void *va)
    4.68 +void make_mmu_page_writable(void *va)
    4.69  {
    4.70  	pte_t *pte = virt_to_ptep(va);
    4.71  	int rc = HYPERVISOR_update_va_mapping(
    4.72 @@ -436,23 +436,23 @@ void make_page_writable(void *va)
    4.73  #ifdef CONFIG_HIGHMEM
    4.74  		if (pfn < highstart_pfn)
    4.75  #endif
    4.76 -			make_lowmem_page_writable(
    4.77 +			make_lowmem_mmu_page_writable(
    4.78  				phys_to_virt(pfn << PAGE_SHIFT)); 
    4.79  	}
    4.80  }
    4.81  
    4.82 -void make_pages_readonly(void *va, unsigned int nr)
    4.83 +void make_mmu_pages_readonly(void *va, unsigned int nr)
    4.84  {
    4.85  	while (nr-- != 0) {
    4.86 -		make_page_readonly(va);
    4.87 +		make_mmu_page_readonly(va);
    4.88  		va = (void *)((unsigned long)va + PAGE_SIZE);
    4.89  	}
    4.90  }
    4.91  
    4.92 -void make_pages_writable(void *va, unsigned int nr)
    4.93 +void make_mmu_pages_writable(void *va, unsigned int nr)
    4.94  {
    4.95  	while (nr-- != 0) {
    4.96 -		make_page_writable(va);
    4.97 +		make_mmu_page_writable(va);
    4.98  		va = (void *)((unsigned long)va + PAGE_SIZE);
    4.99  	}
   4.100  }
     5.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c	Thu Jan 26 11:31:28 2006 +0100
     5.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c	Fri Jan 27 11:29:42 2006 +0000
     5.3 @@ -239,7 +239,7 @@ void __init smp_prepare_cpus(unsigned in
     5.4  		memcpy((void *)cpu_gdt_descr[cpu].address,
     5.5  		       (void *)cpu_gdt_descr[0].address,
     5.6  		       cpu_gdt_descr[0].size);
     5.7 -		make_page_readonly((void *)cpu_gdt_descr[cpu].address);
     5.8 +		make_mmu_page_readonly((void *)cpu_gdt_descr[cpu].address);
     5.9  
    5.10  		cpu_set(cpu, cpu_possible_map);
    5.11  #ifdef CONFIG_HOTPLUG_CPU
     6.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c	Thu Jan 26 11:31:28 2006 +0100
     6.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c	Fri Jan 27 11:29:42 2006 +0000
     6.3 @@ -65,8 +65,8 @@ static int alloc_ldt(mm_context_t *pc, u
     6.4  
     6.5  		preempt_disable();
     6.6  #endif
     6.7 -		make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
     6.8 -				    PAGE_SIZE);
     6.9 +		make_mmu_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
    6.10 +					PAGE_SIZE);
    6.11  		load_LDT(pc);
    6.12  #ifdef CONFIG_SMP
    6.13  		mask = cpumask_of_cpu(smp_processor_id());
    6.14 @@ -76,7 +76,7 @@ static int alloc_ldt(mm_context_t *pc, u
    6.15  #endif
    6.16  	}
    6.17  	if (oldsize) {
    6.18 -		make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
    6.19 +		make_mmu_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
    6.20  			PAGE_SIZE);
    6.21  		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
    6.22  			vfree(oldldt);
    6.23 @@ -92,8 +92,8 @@ static inline int copy_ldt(mm_context_t 
    6.24  	if (err < 0)
    6.25  		return err;
    6.26  	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
    6.27 -	make_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
    6.28 -			    PAGE_SIZE);
    6.29 +	make_mmu_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
    6.30 +				PAGE_SIZE);
    6.31  	return 0;
    6.32  }
    6.33  
    6.34 @@ -131,9 +131,9 @@ void destroy_context(struct mm_struct *m
    6.35  	if (mm->context.size) {
    6.36  		if (mm == current->active_mm)
    6.37  			clear_LDT();
    6.38 -		make_pages_writable(mm->context.ldt, 
    6.39 -				    (mm->context.size * LDT_ENTRY_SIZE) /
    6.40 -				    PAGE_SIZE);
    6.41 +		make_mmu_pages_writable(mm->context.ldt,
    6.42 +					(mm->context.size * LDT_ENTRY_SIZE) /
    6.43 +					PAGE_SIZE);
    6.44  		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
    6.45  			vfree(mm->context.ldt);
    6.46  		else
     7.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c	Thu Jan 26 11:31:28 2006 +0100
     7.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c	Fri Jan 27 11:29:42 2006 +0000
     7.3 @@ -141,7 +141,7 @@ void __cpuinit cpu_gdt_init(struct desc_
     7.4  	     va < gdt_descr->address + gdt_descr->size;
     7.5  	     va += PAGE_SIZE, f++) {
     7.6  		frames[f] = virt_to_mfn(va);
     7.7 -		make_page_readonly((void *)va);
     7.8 +		make_mmu_page_readonly((void *)va);
     7.9  	}
    7.10  	if (HYPERVISOR_set_gdt(frames, gdt_descr->size /
    7.11                                 sizeof (struct desc_struct)))
     8.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Thu Jan 26 11:31:28 2006 +0100
     8.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Fri Jan 27 11:29:42 2006 +0000
     8.3 @@ -66,7 +66,7 @@ extern unsigned long start_pfn;
     8.4  	(((mfn_to_pfn((addr) >> PAGE_SHIFT)) << PAGE_SHIFT) +	\
     8.5  	__START_KERNEL_map)))
     8.6  
     8.7 -static void early_make_page_readonly(void *va)
     8.8 +static void early_make_mmu_page_readonly(void *va)
     8.9  {
    8.10  	unsigned long addr, _va = (unsigned long)va;
    8.11  	pte_t pte, *ptep;
    8.12 @@ -88,7 +88,7 @@ static void early_make_page_readonly(voi
    8.13  		BUG();
    8.14  }
    8.15  
    8.16 -void make_page_readonly(void *va)
    8.17 +void make_mmu_page_readonly(void *va)
    8.18  {
    8.19  	pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t pte, *ptep;
    8.20  	unsigned long addr = (unsigned long) va;
    8.21 @@ -103,10 +103,10 @@ void make_page_readonly(void *va)
    8.22  		xen_l1_entry_update(ptep, pte); /* fallback */
    8.23  
    8.24  	if ((addr >= VMALLOC_START) && (addr < VMALLOC_END))
    8.25 -		make_page_readonly(__va(pte_pfn(pte) << PAGE_SHIFT));
    8.26 +		make_mmu_page_readonly(__va(pte_pfn(pte) << PAGE_SHIFT));
    8.27  }
    8.28  
    8.29 -void make_page_writable(void *va)
    8.30 +void make_mmu_page_writable(void *va)
    8.31  {
    8.32  	pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t pte, *ptep;
    8.33  	unsigned long addr = (unsigned long) va;
    8.34 @@ -121,21 +121,21 @@ void make_page_writable(void *va)
    8.35  		xen_l1_entry_update(ptep, pte); /* fallback */
    8.36  
    8.37  	if ((addr >= VMALLOC_START) && (addr < VMALLOC_END))
    8.38 -		make_page_writable(__va(pte_pfn(pte) << PAGE_SHIFT));
    8.39 +		make_mmu_page_writable(__va(pte_pfn(pte) << PAGE_SHIFT));
    8.40  }
    8.41  
    8.42 -void make_pages_readonly(void *va, unsigned nr)
    8.43 +void make_mmu_pages_readonly(void *va, unsigned nr)
    8.44  {
    8.45  	while (nr-- != 0) {
    8.46 -		make_page_readonly(va);
    8.47 +		make_mmu_page_readonly(va);
    8.48  		va = (void*)((unsigned long)va + PAGE_SIZE);
    8.49  	}
    8.50  }
    8.51  
    8.52 -void make_pages_writable(void *va, unsigned nr)
    8.53 +void make_mmu_pages_writable(void *va, unsigned nr)
    8.54  {
    8.55  	while (nr-- != 0) {
    8.56 -		make_page_writable(va);
    8.57 +		make_mmu_page_writable(va);
    8.58  		va = (void*)((unsigned long)va + PAGE_SIZE);
    8.59  	}
    8.60  }
    8.61 @@ -223,7 +223,7 @@ static void set_pte_phys(unsigned long v
    8.62  	pud = (user_mode ? pud_offset_u(vaddr) : pud_offset(pgd, vaddr));
    8.63  	if (pud_none(*pud)) {
    8.64  		pmd = (pmd_t *) spp_getpage(); 
    8.65 -		make_page_readonly(pmd);
    8.66 +		make_mmu_page_readonly(pmd);
    8.67  		xen_pmd_pin(__pa(pmd));
    8.68  		set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
    8.69  		if (pmd != pmd_offset(pud, 0)) {
    8.70 @@ -234,7 +234,7 @@ static void set_pte_phys(unsigned long v
    8.71  	pmd = pmd_offset(pud, vaddr);
    8.72  	if (pmd_none(*pmd)) {
    8.73  		pte = (pte_t *) spp_getpage();
    8.74 -		make_page_readonly(pte);
    8.75 +		make_mmu_page_readonly(pte);
    8.76  		xen_pte_pin(__pa(pte));
    8.77  		set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
    8.78  		if (pte != pte_offset_kernel(pmd, 0)) {
    8.79 @@ -276,7 +276,7 @@ static void set_pte_phys_ma(unsigned lon
    8.80  	if (pud_none(*pud)) {
    8.81  
    8.82  		pmd = (pmd_t *) spp_getpage(); 
    8.83 -		make_page_readonly(pmd);
    8.84 +		make_mmu_page_readonly(pmd);
    8.85  		xen_pmd_pin(__pa(pmd));
    8.86  
    8.87  		set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
    8.88 @@ -290,7 +290,7 @@ static void set_pte_phys_ma(unsigned lon
    8.89  
    8.90  	if (pmd_none(*pmd)) {
    8.91  		pte = (pte_t *) spp_getpage();
    8.92 -		make_page_readonly(pte);  
    8.93 +		make_mmu_page_readonly(pte);
    8.94  		xen_pte_pin(__pa(pte));
    8.95  
    8.96  		set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
    8.97 @@ -419,7 +419,7 @@ static void __init phys_pud_init(pud_t *
    8.98  		} 
    8.99  
   8.100  		pmd = alloc_static_page(&pmd_phys);
   8.101 -		early_make_page_readonly(pmd);
   8.102 +		early_make_mmu_page_readonly(pmd);
   8.103  		xen_pmd_pin(pmd_phys);
   8.104  		set_pud(pud, __pud(pmd_phys | _KERNPG_TABLE));
   8.105        		for (j = 0; j < PTRS_PER_PMD; pmd++, j++) {
   8.106 @@ -448,7 +448,7 @@ static void __init phys_pud_init(pud_t *
   8.107  				__set_pte(pte, __pte(paddr | _KERNPG_TABLE));
   8.108  			}
   8.109  			pte = pte_save;
   8.110 -			early_make_page_readonly(pte);  
   8.111 +			early_make_mmu_page_readonly(pte);
   8.112  			xen_pte_pin(pte_phys);
   8.113  			set_pmd(pmd, __pmd(pte_phys | _KERNPG_TABLE));
   8.114  		}
   8.115 @@ -497,11 +497,11 @@ void __init xen_init_pt(void)
   8.116  		      _KERNPG_TABLE | _PAGE_USER);
   8.117  	memcpy((void *)level2_kernel_pgt, page, PAGE_SIZE);
   8.118  
   8.119 -	early_make_page_readonly(init_level4_pgt);
   8.120 -	early_make_page_readonly(init_level4_user_pgt);
   8.121 -	early_make_page_readonly(level3_kernel_pgt);
   8.122 -	early_make_page_readonly(level3_user_pgt);
   8.123 -	early_make_page_readonly(level2_kernel_pgt);
   8.124 +	early_make_mmu_page_readonly(init_level4_pgt);
   8.125 +	early_make_mmu_page_readonly(init_level4_user_pgt);
   8.126 +	early_make_mmu_page_readonly(level3_kernel_pgt);
   8.127 +	early_make_mmu_page_readonly(level3_user_pgt);
   8.128 +	early_make_mmu_page_readonly(level2_kernel_pgt);
   8.129  
   8.130  	xen_pgd_pin(__pa_symbol(init_level4_pgt));
   8.131  	xen_pgd_pin(__pa_symbol(init_level4_user_pgt));
   8.132 @@ -539,7 +539,7 @@ void __init extend_init_mapping(void)
   8.133  		pmd = (pmd_t *)&page[pmd_index(va)];
   8.134  		if (pmd_none(*pmd)) {
   8.135  			pte_page = alloc_static_page(&phys);
   8.136 -			early_make_page_readonly(pte_page);
   8.137 +			early_make_mmu_page_readonly(pte_page);
   8.138  			xen_pte_pin(phys);
   8.139  			set_pmd(pmd, __pmd(phys | _KERNPG_TABLE | _PAGE_USER));
   8.140  		} else {
   8.141 @@ -586,7 +586,7 @@ void __init init_memory_mapping(unsigned
   8.142  	for (; start < end; start = next) {
   8.143  		unsigned long pud_phys; 
   8.144  		pud_t *pud = alloc_static_page(&pud_phys);
   8.145 -		early_make_page_readonly(pud);
   8.146 +		early_make_mmu_page_readonly(pud);
   8.147  		xen_pud_pin(pud_phys);
   8.148  		next = start + PGDIR_SIZE;
   8.149  		if (next > end) 
   8.150 @@ -791,11 +791,11 @@ void free_initmem(void)
   8.151  		set_page_count(virt_to_page(addr), 1);
   8.152  		memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE); 
   8.153  		xen_pte_unpin(__pa(addr));
   8.154 -		make_page_writable(__va(__pa(addr)));
   8.155 +		make_mmu_page_writable(__va(__pa(addr)));
   8.156  		/*
   8.157  		 * Make pages from __PAGE_OFFSET address as well
   8.158  		 */
   8.159 -		make_page_writable((void *)addr);
   8.160 +		make_mmu_page_writable((void *)addr);
   8.161  		free_page(addr);
   8.162  		totalram_pages++;
   8.163  	}
     9.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h	Thu Jan 26 11:31:28 2006 +0100
     9.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h	Fri Jan 27 11:29:42 2006 +0000
     9.3 @@ -42,7 +42,7 @@ extern struct page *pte_alloc_one(struct
     9.4  static inline void pte_free_kernel(pte_t *pte)
     9.5  {
     9.6  	free_page((unsigned long)pte);
     9.7 -	make_page_writable(pte);
     9.8 +	make_mmu_page_writable(pte);
     9.9  }
    9.10  
    9.11  extern void pte_free(struct page *pte);
    10.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h	Thu Jan 26 11:31:28 2006 +0100
    10.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h	Fri Jan 27 11:29:42 2006 +0000
    10.3 @@ -413,19 +413,19 @@ do {				  					\
    10.4  } while (0)
    10.5  
    10.6  #ifndef CONFIG_XEN_SHADOW_MODE
    10.7 -void make_lowmem_page_readonly(void *va);
    10.8 -void make_lowmem_page_writable(void *va);
    10.9 -void make_page_readonly(void *va);
   10.10 -void make_page_writable(void *va);
   10.11 -void make_pages_readonly(void *va, unsigned int nr);
   10.12 -void make_pages_writable(void *va, unsigned int nr);
   10.13 +void make_lowmem_mmu_page_readonly(void *va);
   10.14 +void make_lowmem_mmu_page_writable(void *va);
   10.15 +void make_mmu_page_readonly(void *va);
   10.16 +void make_mmu_page_writable(void *va);
   10.17 +void make_mmu_pages_readonly(void *va, unsigned int nr);
   10.18 +void make_mmu_pages_writable(void *va, unsigned int nr);
   10.19  #else
   10.20 -#define make_lowmem_page_readonly(_va) ((void)0)
   10.21 -#define make_lowmem_page_writable(_va) ((void)0)
   10.22 -#define make_page_readonly(_va)        ((void)0)
   10.23 -#define make_page_writable(_va)        ((void)0)
   10.24 -#define make_pages_readonly(_va, _nr)  ((void)0)
   10.25 -#define make_pages_writable(_va, _nr)  ((void)0)
   10.26 +#define make_lowmem_mmu_page_readonly(_va) ((void)0)
   10.27 +#define make_lowmem_mmu_page_writable(_va)     ((void)0)
   10.28 +#define make_mmu_page_readonly(_va)        ((void)0)
   10.29 +#define make_mmu_page_writable(_va)            ((void)0)
   10.30 +#define make_mmu_pages_readonly(_va, _nr)  ((void)0)
   10.31 +#define make_mmu_pages_writable(_va, _nr)      ((void)0)
   10.32  #endif
   10.33  
   10.34  #define virt_to_ptep(__va)						\
    11.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgalloc.h	Thu Jan 26 11:31:28 2006 +0100
    11.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgalloc.h	Fri Jan 27 11:29:42 2006 +0000
    11.3 @@ -7,10 +7,10 @@
    11.4  #include <linux/mm.h>
    11.5  #include <asm/io.h>		/* for phys_to_virt and page_to_pseudophys */
    11.6  
    11.7 -void make_page_readonly(void *va);
    11.8 -void make_page_writable(void *va);
    11.9 -void make_pages_readonly(void *va, unsigned int nr);
   11.10 -void make_pages_writable(void *va, unsigned int nr);
   11.11 +void make_mmu_page_readonly(void *va);
   11.12 +void make_mmu_page_writable(void *va);
   11.13 +void make_mmu_pages_readonly(void *va, unsigned int nr);
   11.14 +void make_mmu_pages_writable(void *va, unsigned int nr);
   11.15  
   11.16  #define __user_pgd(pgd) ((pgd) + PTRS_PER_PGD)
   11.17  
   11.18 @@ -161,7 +161,7 @@ static inline pte_t *pte_alloc_one_kerne
   11.19  {
   11.20          pte_t *pte = (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
   11.21          if (pte)
   11.22 -		make_page_readonly(pte);
   11.23 +		make_mmu_page_readonly(pte);
   11.24  
   11.25  	return pte;
   11.26  }
   11.27 @@ -181,7 +181,7 @@ extern __inline__ void pte_free_kernel(p
   11.28  {
   11.29  	BUG_ON((unsigned long)pte & (PAGE_SIZE-1));
   11.30          xen_pte_unpin(__pa(pte));
   11.31 -        make_page_writable(pte);
   11.32 +        make_mmu_page_writable(pte);
   11.33  	free_page((unsigned long)pte); 
   11.34  }
   11.35