ia64/xen-unstable

changeset 12899:37141c3a3d39

[XEN] Remove unnecessary shadow_mode_refcount() code from PV mm code.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Dec 11 15:06:53 2006 +0000 (2006-12-11)
parents 6edf8b33e7d1
children c0d41ac21486 4ae4bdee00e6 749c399d73df
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Mon Dec 11 11:57:36 2006 +0000
     1.2 +++ b/xen/arch/x86/mm.c	Mon Dec 11 15:06:53 2006 +0000
     1.3 @@ -435,15 +435,6 @@ int map_ldt_shadow_page(unsigned int off
     1.4          return 0;
     1.5  
     1.6      okay = get_page_and_type(mfn_to_page(mfn), d, PGT_ldt_page);
     1.7 -
     1.8 -    if ( !okay && unlikely(shadow_mode_refcounts(d)) )
     1.9 -    {
    1.10 -        shadow_lock(d);
    1.11 -        shadow_remove_write_access(d->vcpu[0], _mfn(mfn), 0, 0);
    1.12 -        okay = get_page_and_type(mfn_to_page(mfn), d, PGT_ldt_page);
    1.13 -        shadow_unlock(d);
    1.14 -    }
    1.15 -
    1.16      if ( unlikely(!okay) )
    1.17          return 0;
    1.18  
    1.19 @@ -509,8 +500,6 @@ get_linear_pagetable(
    1.20      struct page_info *page;
    1.21      unsigned long pfn;
    1.22  
    1.23 -    ASSERT( !shadow_mode_refcounts(d) );
    1.24 -
    1.25      if ( (root_get_flags(re) & _PAGE_RW) )
    1.26      {
    1.27          MEM_LOG("Attempt to create linear p.t. with write perms");
    1.28 @@ -821,8 +810,6 @@ static int alloc_l1_table(struct page_in
    1.29      l1_pgentry_t  *pl1e;
    1.30      int            i;
    1.31  
    1.32 -    ASSERT(!shadow_mode_refcounts(d));
    1.33 -
    1.34      pl1e = map_domain_page(pfn);
    1.35  
    1.36      for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
    1.37 @@ -873,8 +860,6 @@ static int create_pae_xen_mappings(l3_pg
    1.38       *  2. Cannot appear in another page table's L3:
    1.39       *     a. alloc_l3_table() calls this function and this check will fail
    1.40       *     b. mod_l3_entry() disallows updates to slot 3 in an existing table
    1.41 -     *
    1.42 -     * XXX -- this needs revisiting for shadow_mode_refcount()==true...
    1.43       */
    1.44      page = l3e_get_page(l3e3);
    1.45      BUG_ON(page->u.inuse.type_info & PGT_pinned);
    1.46 @@ -959,8 +944,6 @@ static int alloc_l2_table(struct page_in
    1.47      l2_pgentry_t  *pl2e;
    1.48      int            i;
    1.49  
    1.50 -    ASSERT(!shadow_mode_refcounts(d));
    1.51 -    
    1.52      pl2e = map_domain_page(pfn);
    1.53  
    1.54      for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ )
    1.55 @@ -1008,8 +991,6 @@ static int alloc_l3_table(struct page_in
    1.56      l3_pgentry_t  *pl3e;
    1.57      int            i;
    1.58  
    1.59 -    ASSERT(!shadow_mode_refcounts(d));
    1.60 -
    1.61  #ifdef CONFIG_X86_PAE
    1.62      /*
    1.63       * PAE pgdirs above 4GB are unacceptable if the guest does not understand
    1.64 @@ -1075,8 +1056,6 @@ static int alloc_l4_table(struct page_in
    1.65      l4_pgentry_t  *pl4e = page_to_virt(page);
    1.66      int            i;
    1.67  
    1.68 -    ASSERT(!shadow_mode_refcounts(d));
    1.69 -
    1.70      for ( i = 0; i < L4_PAGETABLE_ENTRIES; i++ )
    1.71      {
    1.72          if ( is_guest_l4_slot(i) &&