ia64/xen-unstable

changeset 4666:b73324fab5b1

bitkeeper revision 1.1385.1.4 (426f6b66K5Xrx0v2--zUfkahi8mIUw)

Invalidate p2m entries when blocks of phys memory are handed back to
Xen allocation pool. This is the correct fix for the "dom0 kernel
crashes when I create a domU" bug.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Apr 27 10:37:26 2005 +0000 (2005-04-27)
parents bb65a9270780
children 435ff7469fc1
files linux-2.6.11-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/hypervisor.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/hypervisor.c	Wed Apr 27 10:35:49 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/hypervisor.c	Wed Apr 27 10:37:26 2005 +0000
     1.3 @@ -211,7 +211,8 @@ unsigned long allocate_empty_lowmem_regi
     1.4          pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE))); 
     1.5          pfn_array[i] = pte->pte_low >> PAGE_SHIFT;
     1.6          HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE), __pte_ma(0), 0);
     1.7 -        phys_to_machine_mapping[__pa(vstart)>>PAGE_SHIFT] = INVALID_P2M_ENTRY;
     1.8 +        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
     1.9 +            INVALID_P2M_ENTRY;
    1.10      }
    1.11  
    1.12      flush_tlb_all();
     2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/hypervisor.c	Wed Apr 27 10:35:49 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/hypervisor.c	Wed Apr 27 10:37:26 2005 +0000
     2.3 @@ -258,7 +258,8 @@ unsigned long allocate_empty_lowmem_regi
     2.4          pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE))); 
     2.5          pfn_array[i] = pte->pte >> PAGE_SHIFT;
     2.6          xen_l1_entry_update(pte, 0);
     2.7 -        phys_to_machine_mapping[__pa(vstart)>>PAGE_SHIFT] = (u32)INVALID_P2M_ENTRY;
     2.8 +        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
     2.9 +            (u32)INVALID_P2M_ENTRY;
    2.10      }
    2.11  
    2.12      /* Flush updates through and flush the TLB. */