Print this page
remove xhat
The xhat infrastructure was added to support hardware such as the zulu
graphics card - hardware which had on-board MMUs.  The VM used the xhat code
to keep the CPU's and Zulu's page tables in-sync.  Since the only xhat user
was zulu (which is gone), we can safely remove it simplifying the whole VM
subsystem.
Assorted notes:
- AS_BUSY flag was used solely by xhat

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/watchpoint.c
          +++ new/usr/src/uts/common/os/watchpoint.c
↓ open down ↓ 174 lines elided ↑ open up ↑
 175  175          ASSERT(as != &kas);
 176  176  
 177  177  startover:
 178  178          ASSERT(rv == 0);
 179  179          if (avl_numnodes(&as->a_wpage) == 0)
 180  180                  return (0);
 181  181  
 182  182          /*
 183  183           * as->a_wpage can only be changed while the process is totally stopped.
 184  184           * Don't grab p_lock here.  Holding p_lock while grabbing the address
 185      -         * space lock leads to deadlocks with the clock thread.  Note that if an
 186      -         * as_fault() is servicing a fault to a watched page on behalf of an
 187      -         * XHAT provider, watchpoint will be temporarily cleared (and wp_prot
 188      -         * will be set to wp_oprot).  Since this is done while holding as writer
 189      -         * lock, we need to grab as lock (reader lock is good enough).
      185 +         * space lock leads to deadlocks with the clock thread.
 190  186           *
 191  187           * p_maplock prevents simultaneous execution of this function.  Under
 192  188           * normal circumstances, holdwatch() will stop all other threads, so the
 193  189           * lock isn't really needed.  But there may be multiple threads within
 194  190           * stop() when SWATCHOK is set, so we need to handle multiple threads
 195  191           * at once.  See holdwatch() for the details of this dance.
 196  192           */
 197  193  
 198  194          mutex_enter(&p->p_maplock);
 199  195          AS_LOCK_ENTER(as, &as->a_lock, RW_READER);
↓ open down ↓ 297 lines elided ↑ open up ↑
 497  493   */
 498  494  int
 499  495  pr_is_watchpage(caddr_t addr, enum seg_rw rw)
 500  496  {
 501  497          struct as *as = curproc->p_as;
 502  498          int rv;
 503  499  
 504  500          if ((as == &kas) || avl_numnodes(&as->a_wpage) == 0)
 505  501                  return (0);
 506  502  
 507      -        /* Grab the lock because of XHAT (see comment in pr_mappage()) */
 508  503          AS_LOCK_ENTER(as, &as->a_lock, RW_READER);
 509  504          rv = pr_is_watchpage_as(addr, rw, as);
 510  505          AS_LOCK_EXIT(as, &as->a_lock);
 511  506  
 512  507          return (rv);
 513  508  }
 514  509  
 515  510  
 516  511  
 517  512  /*
↓ open down ↓ 1227 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX