ia64/xen-unstable

changeset 1880:020f58885ed4

bitkeeper revision 1.1108.2.22 (410083a0-dBCDjHcryIgCa_AFqhcNA)

memory.c:
Fix invalidate LDT code to invalidate the correct LDT.
author kaf24@scramble.cl.cam.ac.uk
date Fri Jul 23 03:18:56 2004 +0000 (2004-07-23)
parents 8a98ffe9c5ef
children 51f8d2380c82
files xen/arch/x86/memory.c
line diff
     1.1 --- a/xen/arch/x86/memory.c	Fri Jul 23 00:38:05 2004 +0000
     1.2 +++ b/xen/arch/x86/memory.c	Fri Jul 23 03:18:56 2004 +0000
     1.3 @@ -164,9 +164,8 @@ static void __invalidate_shadow_ldt(stru
     1.4  }
     1.5  
     1.6  
     1.7 -static inline void invalidate_shadow_ldt(void)
     1.8 +static inline void invalidate_shadow_ldt(struct domain *d)
     1.9  {
    1.10 -    struct domain *d = current;
    1.11      if ( d->mm.shadow_ldt_mapcnt != 0 )
    1.12          __invalidate_shadow_ldt(d);
    1.13  }
    1.14 @@ -387,7 +386,7 @@ static void put_page_from_l1e(l1_pgentry
    1.15          if ( unlikely(((page->type_and_flags & PGT_type_mask) == 
    1.16                         PGT_ldt_page)) &&
    1.17               unlikely(((page->type_and_flags & PGT_count_mask) != 0)) )
    1.18 -            invalidate_shadow_ldt();
    1.19 +            invalidate_shadow_ldt(page->u.domain);
    1.20          put_page(page);
    1.21      }
    1.22  }
    1.23 @@ -748,7 +747,7 @@ static int do_extended_command(unsigned 
    1.24          okay = get_page_and_type_from_pagenr(pfn, PGT_l2_page_table, d);
    1.25          if ( likely(okay) )
    1.26          {
    1.27 -            invalidate_shadow_ldt();
    1.28 +            invalidate_shadow_ldt(d);
    1.29  
    1.30              percpu_info[cpu].deferred_ops &= ~DOP_FLUSH_TLB;
    1.31              old_base_pfn = pagetable_val(d->mm.pagetable) >> PAGE_SHIFT;
    1.32 @@ -795,7 +794,7 @@ static int do_extended_command(unsigned 
    1.33          else if ( (d->mm.ldt_ents != ents) || 
    1.34                    (d->mm.ldt_base != ptr) )
    1.35          {
    1.36 -            invalidate_shadow_ldt();
    1.37 +            invalidate_shadow_ldt(d);
    1.38              d->mm.ldt_base = ptr;
    1.39              d->mm.ldt_ents = ents;
    1.40              load_LDT(d);