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

@@ -30,15 +30,10 @@
 #include <vm/seg_kmem.h>
 #include <sys/psm.h>
 #include <sys/psm_modctl.h>
 #include <sys/smp_impldefs.h>
 #include <sys/reboot.h>
-#if defined(__xpv)
-#include <sys/hypervisor.h>
-#include <vm/kboot_mmu.h>
-#include <vm/hat_pte.h>
-#endif
 
 /*
  *      External reference functions
  */
 extern void *get_next_mach(void *, char *);

@@ -211,24 +206,11 @@
 
         if (len == 0)
                 return (0);
 
         pgoffset = addr & MMU_PAGEOFFSET;
-#ifdef __xpv
-        /*
-         * If we're dom0, we're starting from a MA. translate that to a PA
-         * XXPV - what about driver domains???
-         */
-        if (DOMAIN_IS_INITDOMAIN(xen_info)) {
-                base = pfn_to_pa(xen_assign_pfn(mmu_btop(addr))) |
-                    (addr & MMU_PAGEOFFSET);
-        } else {
                 base = addr;
-        }
-#else
-        base = addr;
-#endif
         npages = mmu_btopr(len + pgoffset);
         cvaddr = device_arena_alloc(ptob(npages), VM_NOSLEEP);
         if (cvaddr == NULL)
                 return (0);
         hat_devload(kas.a_hat, cvaddr, mmu_ptob(npages), mmu_btop(base),

@@ -343,15 +325,11 @@
 {
         *p0 = (int)modl->psm_swp->psw_infop->p_owner;
         return (0);
 }
 
-#if defined(__xpv)
-#define DEFAULT_PSM_MODULE      "xpv_uppc"
-#else
 #define DEFAULT_PSM_MODULE      "uppc"
-#endif
 
 static char *
 psm_get_impl_module(int first)
 {
         static char **pnamep;

@@ -388,16 +366,10 @@
                         cmn_err(CE_CONT, "!Skipping psm: %s\n", this);
         }
         close_mach_list();
 }
 
-#if defined(__xpv)
-#define NOTSUP_MSG "This version of Solaris xVM does not support this hardware"
-#else
-#define NOTSUP_MSG "This version of Solaris does not support this hardware"
-#endif  /* __xpv */
-
 void
 psm_install(void)
 {
         struct psm_sw *swp, *cswp;
         struct psm_ops *opsp;

@@ -427,11 +399,11 @@
                             &machstring[0], err);
                 mutex_enter(&psmsw_lock);
         }
         mutex_exit(&psmsw_lock);
         if (psmcnt == 0)
-                halt(NOTSUP_MSG);
+                halt("This hardware is not supported by current OS version");
         (*psminitf)();
 }
 
 /*
  * Return 1 if kernel debugger is present, and 0 if not.