ia64/xen-unstable

changeset 11097:f328519053f5

[XEN] Remove sync_pagetable_state(). No longer needed.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Aug 14 10:58:02 2006 +0100 (2006-08-14)
parents eb66b68db7b1
children 4852b556d912
files xen/arch/x86/mm.c xen/arch/x86/traps.c xen/common/domain.c xen/common/grant_table.c xen/include/asm-ia64/mm.h xen/include/asm-powerpc/mm.h xen/include/asm-x86/mm.h
line diff
     1.1 --- a/xen/arch/x86/mm.c	Mon Aug 14 10:47:59 2006 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Mon Aug 14 10:58:02 2006 +0100
     1.3 @@ -1657,26 +1657,6 @@ int get_page_type(struct page_info *page
     1.4              {
     1.5                  if ( unlikely((x & PGT_type_mask) != (type & PGT_type_mask) ) )
     1.6                  {
     1.7 -                    if ( (current->domain == page_get_owner(page)) &&
     1.8 -                         ((x & PGT_type_mask) == PGT_writable_page) )
     1.9 -                    {
    1.10 -                        /*
    1.11 -                         * This ensures functions like set_gdt() see up-to-date
    1.12 -                         * type info without needing to clean up writable p.t.
    1.13 -                         * state on the fast path. We take this path only
    1.14 -                         * when the current type is writable because:
    1.15 -                         *  1. It's the only type that this path can decrement.
    1.16 -                         *  2. If we take this path more liberally then we can
    1.17 -                         *     enter a recursive loop via get_page_from_l1e()
    1.18 -                         *     during pagetable revalidation.
    1.19 -                         */
    1.20 -                        sync_pagetable_state(current->domain);
    1.21 -                        y = page->u.inuse.type_info;
    1.22 -                        /* Can we make progress now? */
    1.23 -                        if ( ((y & PGT_type_mask) == (type & PGT_type_mask)) ||
    1.24 -                             ((y & PGT_count_mask) == 0) )
    1.25 -                            goto again;
    1.26 -                    }
    1.27                      if ( ((x & PGT_type_mask) != PGT_l2_page_table) ||
    1.28                           ((type & PGT_type_mask) != PGT_l1_page_table) )
    1.29                          MEM_LOG("Bad type (saw %" PRtype_info
    1.30 @@ -1937,8 +1917,6 @@ int do_mmuext_op(
    1.31  
    1.32      LOCK_BIGLOCK(d);
    1.33  
    1.34 -    sync_pagetable_state(d);
    1.35 -
    1.36      if ( unlikely(count & MMU_UPDATE_PREEMPTED) )
    1.37      {
    1.38          count &= ~MMU_UPDATE_PREEMPTED;
    1.39 @@ -2190,8 +2168,6 @@ int do_mmu_update(
    1.40  
    1.41      LOCK_BIGLOCK(d);
    1.42  
    1.43 -    sync_pagetable_state(d);
    1.44 -
    1.45      if ( unlikely(shadow_mode_enabled(d)) )
    1.46          check_pagetable(v, "pre-mmu"); /* debug */
    1.47  
    1.48 @@ -2701,8 +2677,6 @@ int do_update_va_mapping(unsigned long v
    1.49  
    1.50      LOCK_BIGLOCK(d);
    1.51  
    1.52 -    sync_pagetable_state(d);
    1.53 -
    1.54      if ( unlikely(shadow_mode_enabled(d)) )
    1.55          check_pagetable(v, "pre-va"); /* debug */
    1.56  
    1.57 @@ -3337,11 +3311,6 @@ int ptwr_do_page_fault(struct domain *d,
    1.58      return 0;
    1.59  }
    1.60  
    1.61 -void sync_pagetable_state(struct domain *d)
    1.62 -{
    1.63 -    shadow_sync_all(d);
    1.64 -}
    1.65 -
    1.66  int map_pages_to_xen(
    1.67      unsigned long virt,
    1.68      unsigned long mfn,
     2.1 --- a/xen/arch/x86/traps.c	Mon Aug 14 10:47:59 2006 +0100
     2.2 +++ b/xen/arch/x86/traps.c	Mon Aug 14 10:58:02 2006 +0100
     2.3 @@ -713,7 +713,6 @@ static int handle_gdt_ldt_mapping_fault(
     2.4      {
     2.5          /* LDT fault: Copy a mapping from the guest's LDT, if it is valid. */
     2.6          LOCK_BIGLOCK(d);
     2.7 -        sync_pagetable_state(d);
     2.8          ret = map_ldt_shadow_page(offset >> PAGE_SHIFT);
     2.9          UNLOCK_BIGLOCK(d);
    2.10  
    2.11 @@ -849,7 +848,6 @@ static int spurious_page_fault(
    2.12      int            is_spurious;
    2.13  
    2.14      LOCK_BIGLOCK(d);
    2.15 -    sync_pagetable_state(d);
    2.16      is_spurious = __spurious_page_fault(addr, regs);
    2.17      UNLOCK_BIGLOCK(d);
    2.18  
    2.19 @@ -1302,7 +1300,6 @@ static int emulate_privileged_op(struct 
    2.20  
    2.21          case 3: /* Write CR3 */
    2.22              LOCK_BIGLOCK(v->domain);
    2.23 -            sync_pagetable_state(v->domain);
    2.24              (void)new_guest_cr3(gmfn_to_mfn(v->domain, xen_cr3_to_pfn(*reg)));
    2.25              UNLOCK_BIGLOCK(v->domain);
    2.26              break;
     3.1 --- a/xen/common/domain.c	Mon Aug 14 10:47:59 2006 +0100
     3.2 +++ b/xen/common/domain.c	Mon Aug 14 10:58:02 2006 +0100
     3.3 @@ -266,8 +266,6 @@ static void domain_shutdown_finalise(voi
     3.4          vcpu_sleep_sync(v);
     3.5      BUG_ON(!cpus_empty(d->domain_dirty_cpumask));
     3.6  
     3.7 -    sync_pagetable_state(d);
     3.8 -
     3.9      /* Don't set DOMF_shutdown until execution contexts are sync'ed. */
    3.10      if ( !test_and_set_bit(_DOMF_shutdown, &d->domain_flags) )
    3.11          send_guest_global_virq(dom0, VIRQ_DOM_EXC);
    3.12 @@ -406,8 +404,6 @@ void domain_pause(struct domain *d)
    3.13  
    3.14      for_each_vcpu( d, v )
    3.15          vcpu_sleep_sync(v);
    3.16 -
    3.17 -    sync_pagetable_state(d);
    3.18  }
    3.19  
    3.20  void domain_unpause(struct domain *d)
    3.21 @@ -439,8 +435,6 @@ void domain_pause_by_systemcontroller(st
    3.22          for_each_vcpu ( d, v )
    3.23              vcpu_sleep_sync(v);
    3.24      }
    3.25 -
    3.26 -    sync_pagetable_state(d);
    3.27  }
    3.28  
    3.29  void domain_unpause_by_systemcontroller(struct domain *d)
     4.1 --- a/xen/common/grant_table.c	Mon Aug 14 10:47:59 2006 +0100
     4.2 +++ b/xen/common/grant_table.c	Mon Aug 14 10:58:02 2006 +0100
     4.3 @@ -942,8 +942,6 @@ do_grant_table_op(
     4.4      
     4.5      LOCK_BIGLOCK(d);
     4.6      
     4.7 -    sync_pagetable_state(d);
     4.8 -    
     4.9      rc = -EFAULT;
    4.10      switch ( cmd )
    4.11      {
     5.1 --- a/xen/include/asm-ia64/mm.h	Mon Aug 14 10:47:59 2006 +0100
     5.2 +++ b/xen/include/asm-ia64/mm.h	Mon Aug 14 10:58:02 2006 +0100
     5.3 @@ -500,6 +500,4 @@ extern u64 translate_domain_pte(u64 ptev
     5.4  int steal_page(
     5.5      struct domain *d, struct page_info *page, unsigned int memflags);
     5.6  
     5.7 -#define sync_pagetable_state(d) ((void)0)
     5.8 -
     5.9  #endif /* __ASM_IA64_MM_H__ */
     6.1 --- a/xen/include/asm-powerpc/mm.h	Mon Aug 14 10:47:59 2006 +0100
     6.2 +++ b/xen/include/asm-powerpc/mm.h	Mon Aug 14 10:58:02 2006 +0100
     6.3 @@ -224,6 +224,4 @@ static inline unsigned long gmfn_to_mfn(
     6.4  extern int steal_page(struct domain *d, struct page_info *page,
     6.5                          unsigned int memflags);
     6.6  
     6.7 -#define sync_pagetable_state(d) ((void)0)
     6.8 -
     6.9  #endif
     7.1 --- a/xen/include/asm-x86/mm.h	Mon Aug 14 10:47:59 2006 +0100
     7.2 +++ b/xen/include/asm-x86/mm.h	Mon Aug 14 10:58:02 2006 +0100
     7.3 @@ -312,8 +312,6 @@ int  ptwr_do_page_fault(struct domain *,
     7.4                          struct cpu_user_regs *);
     7.5  int  revalidate_l1(struct domain *, l1_pgentry_t *, l1_pgentry_t *);
     7.6  
     7.7 -void sync_pagetable_state(struct domain *d);
     7.8 -
     7.9  int audit_adjust_pgtables(struct domain *d, int dir, int noisy);
    7.10  
    7.11  #ifndef NDEBUG