ia64/xen-unstable

changeset 5572:b0b95421d32e

bitkeeper revision 1.1748.1.1 (42bbd1c5CE48yPys_hWh-39fCz3QGw)

Patch below is needed to make my system work stable in PAE mode.
Havn't seen problems without PAE, not sure whenever thats just
pure luck or whenever there is a bug in my PAE xenlinux kernel.
To me it looks like a generic bug though.

I've actually trapped into problems with unpin only: A process
exits, somewhere in exit_mm() the page tables are unpinned,
shortly thereafter the mappings are cleared. While doing so the
kernel oopses in zap_pte_range(), on page table write access.
Probably due to some stale tlb entry where the page is still
tagged read-only.
author kaf24@firebug.cl.cam.ac.uk
date Fri Jun 24 09:26:29 2005 +0000 (2005-06-24)
parents d7daa40eb8b0
children 09771c771f7a
files linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c	Fri Jun 24 08:16:13 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c	Fri Jun 24 09:26:29 2005 +0000
     1.3 @@ -461,7 +461,8 @@ void mm_pin(struct mm_struct *mm)
     1.4      mm_walk(mm, PAGE_KERNEL_RO);
     1.5      HYPERVISOR_update_va_mapping(
     1.6          (unsigned long)mm->pgd,
     1.7 -        pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL_RO), 0);
     1.8 +        pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL_RO),
     1.9 +        UVMF_TLB_FLUSH);
    1.10      xen_pgd_pin(__pa(mm->pgd));
    1.11      mm->context.pinned = 1;
    1.12      spin_lock(&mm_unpinned_lock);
    1.13 @@ -480,6 +481,7 @@ void mm_unpin(struct mm_struct *mm)
    1.14          (unsigned long)mm->pgd,
    1.15          pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL), 0);
    1.16      mm_walk(mm, PAGE_KERNEL);
    1.17 +    xen_tlb_flush();
    1.18      mm->context.pinned = 0;
    1.19      spin_lock(&mm_unpinned_lock);
    1.20      list_add(&mm->context.unpinned, &mm_unpinned);