Print this page
XXXX remove i86xpv platform code
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/os/mp_implfuncs.c
          +++ new/usr/src/uts/i86pc/os/mp_implfuncs.c
↓ open down ↓ 24 lines elided ↑ open up ↑
  25   25  #define PSMI_1_7
  26   26  
  27   27  #include <sys/vmem.h>
  28   28  #include <vm/hat.h>
  29   29  #include <sys/modctl.h>
  30   30  #include <vm/seg_kmem.h>
  31   31  #include <sys/psm.h>
  32   32  #include <sys/psm_modctl.h>
  33   33  #include <sys/smp_impldefs.h>
  34   34  #include <sys/reboot.h>
  35      -#if defined(__xpv)
  36      -#include <sys/hypervisor.h>
  37      -#include <vm/kboot_mmu.h>
  38      -#include <vm/hat_pte.h>
  39      -#endif
  40   35  
  41   36  /*
  42   37   *      External reference functions
  43   38   */
  44   39  extern void *get_next_mach(void *, char *);
  45   40  extern void close_mach_list(void);
  46   41  extern void open_mach_list(void);
  47   42  
  48   43  /*
  49   44   * from startup.c - kernel VA range allocator for device mappings
↓ open down ↓ 156 lines elided ↑ open up ↑
 206  201  {
 207  202          uint_t pgoffset;
 208  203          paddr_t base;
 209  204          pgcnt_t npages;
 210  205          caddr_t cvaddr;
 211  206  
 212  207          if (len == 0)
 213  208                  return (0);
 214  209  
 215  210          pgoffset = addr & MMU_PAGEOFFSET;
 216      -#ifdef __xpv
 217      -        /*
 218      -         * If we're dom0, we're starting from a MA. translate that to a PA
 219      -         * XXPV - what about driver domains???
 220      -         */
 221      -        if (DOMAIN_IS_INITDOMAIN(xen_info)) {
 222      -                base = pfn_to_pa(xen_assign_pfn(mmu_btop(addr))) |
 223      -                    (addr & MMU_PAGEOFFSET);
 224      -        } else {
 225      -                base = addr;
 226      -        }
 227      -#else
 228  211          base = addr;
 229      -#endif
 230  212          npages = mmu_btopr(len + pgoffset);
 231  213          cvaddr = device_arena_alloc(ptob(npages), VM_NOSLEEP);
 232  214          if (cvaddr == NULL)
 233  215                  return (0);
 234  216          hat_devload(kas.a_hat, cvaddr, mmu_ptob(npages), mmu_btop(base),
 235  217              prot, HAT_LOAD_LOCK);
 236  218          return (cvaddr + pgoffset);
 237  219  }
 238  220  
 239  221  void
↓ open down ↓ 98 lines elided ↑ open up ↑
 338  320  }
 339  321  
 340  322  /*ARGSUSED1*/
 341  323  static int
 342  324  mod_infopsm(struct modlpsm *modl, struct modlinkage *modlp, int *p0)
 343  325  {
 344  326          *p0 = (int)modl->psm_swp->psw_infop->p_owner;
 345  327          return (0);
 346  328  }
 347  329  
 348      -#if defined(__xpv)
 349      -#define DEFAULT_PSM_MODULE      "xpv_uppc"
 350      -#else
 351  330  #define DEFAULT_PSM_MODULE      "uppc"
 352      -#endif
 353  331  
 354  332  static char *
 355  333  psm_get_impl_module(int first)
 356  334  {
 357  335          static char **pnamep;
 358  336          static char *psm_impl_module_list[] = {
 359  337                  DEFAULT_PSM_MODULE,
 360  338                  (char *)0
 361  339          };
 362  340          static void *mhdl = NULL;
↓ open down ↓ 20 lines elided ↑ open up ↑
 383  361          open_mach_list();
 384  362  
 385  363          for (this = psm_get_impl_module(1); this != (char *)NULL;
 386  364              this = psm_get_impl_module(0)) {
 387  365                  if (modload("mach", this) == -1)
 388  366                          cmn_err(CE_CONT, "!Skipping psm: %s\n", this);
 389  367          }
 390  368          close_mach_list();
 391  369  }
 392  370  
 393      -#if defined(__xpv)
 394      -#define NOTSUP_MSG "This version of Solaris xVM does not support this hardware"
 395      -#else
 396      -#define NOTSUP_MSG "This version of Solaris does not support this hardware"
 397      -#endif  /* __xpv */
 398      -
 399  371  void
 400  372  psm_install(void)
 401  373  {
 402  374          struct psm_sw *swp, *cswp;
 403  375          struct psm_ops *opsp;
 404  376          char machstring[15];
 405  377          int err, psmcnt = 0;
 406  378  
 407  379          mutex_enter(&psmsw_lock);
 408  380          for (swp = psmsw->psw_forw; swp != psmsw; ) {
↓ open down ↓ 13 lines elided ↑ open up ↑
 422  394                  mutex_exit(&psmsw_lock);
 423  395                  (void) strcpy(&machstring[0], cswp->psw_infop->p_mach_idstring);
 424  396                  err = mod_remove_by_name(cswp->psw_infop->p_mach_idstring);
 425  397                  if (err)
 426  398                          cmn_err(CE_WARN, "!%s: mod_remove_by_name failed %d",
 427  399                              &machstring[0], err);
 428  400                  mutex_enter(&psmsw_lock);
 429  401          }
 430  402          mutex_exit(&psmsw_lock);
 431  403          if (psmcnt == 0)
 432      -                halt(NOTSUP_MSG);
      404 +                halt("This hardware is not supported by current OS version");
 433  405          (*psminitf)();
 434  406  }
 435  407  
 436  408  /*
 437  409   * Return 1 if kernel debugger is present, and 0 if not.
 438  410   */
 439  411  int
 440  412  psm_debugger(void)
 441  413  {
 442  414          return ((boothowto & RB_DEBUG) != 0);
 443  415  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX