ia64/xen-unstable

changeset 836:4d5ff0cbdbfb

bitkeeper revision 1.518 (3f8c89edP5chDaj1mr0mM5bVQRlRkg)

memory.c:
Fix bug in new LDT shadow mapping code.
author kaf24@scramble.cl.cam.ac.uk
date Tue Oct 14 23:42:37 2003 +0000 (2003-10-14)
parents 6dfc4a422bbd
children a9b037118083
files xen/common/memory.c
line diff
     1.1 --- a/xen/common/memory.c	Tue Oct 14 17:48:21 2003 +0000
     1.2 +++ b/xen/common/memory.c	Tue Oct 14 23:42:37 2003 +0000
     1.3 @@ -215,7 +215,7 @@ void __init init_frametable(unsigned lon
     1.4  
     1.5  static void __invalidate_shadow_ldt(struct task_struct *p)
     1.6  {
     1.7 -    int i, cpu = smp_processor_id();
     1.8 +    int i, cpu = p->processor;
     1.9      unsigned long pfn;
    1.10      struct pfn_info *page;
    1.11      
    1.12 @@ -289,7 +289,7 @@ int map_ldt_shadow_page(unsigned int off
    1.13      /* Success! */
    1.14      get_page_type(page);
    1.15      get_page_tot(page);
    1.16 -    p->mm.perdomain_pt[l1_table_offset(off)+16] = mk_l1_pgentry(l1e|_PAGE_RW);
    1.17 +    p->mm.perdomain_pt[off+16] = mk_l1_pgentry((l1e&PAGE_MASK)|_PAGE_RW);
    1.18      p->mm.shadow_ldt_mapcnt++;
    1.19  
    1.20      ret = 0;