summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86pc/os/startup.c
diff options
context:
space:
mode:
authormrj <none@none>2007-12-21 14:13:23 -0800
committermrj <none@none>2007-12-21 14:13:23 -0800
commit551bc2a66868b5cb5be6b70ab9f55515e77a39a9 (patch)
treea01e761c9864ea9483c468ced858a0f67edcbf93 /usr/src/uts/i86pc/os/startup.c
parent71a79fe7afa36dcf0de6902c2c6ef432980534d3 (diff)
downloadillumos-joyent-551bc2a66868b5cb5be6b70ab9f55515e77a39a9.tar.gz
PSARC 2007/664 Paravirtualized Drivers for Fully Virtualized xVM Domains
6525093 xnb/xnf should use hypervisor based copy for xnb->xnf data path 6608917 members of struct xnf and xnb need unique names 6609324 deadlock trying to own the HAT migrate lock 6609805 still missing XPV_DISALLOW_MIGRATE/XPV_ALLOW_MIGRATE bracketing in hat_i86.c 6616384 xnb's grant ref unmapping is inefficient 6619947 Solaris should provide a PV network driver for xVM HVM environments 6632774 panic setting up xen console --HG-- rename : usr/src/uts/i86xpv/os/gnttab.c => usr/src/uts/common/xen/os/gnttab.c rename : usr/src/uts/i86xpv/os/hypercall.c => usr/src/uts/common/xen/os/hypercall.c rename : usr/src/uts/i86xpv/sys/gnttab.h => usr/src/uts/common/xen/sys/gnttab.h rename : usr/src/uts/i86xpv/ml/hypersubr.s => usr/src/uts/intel/ia32/ml/hypersubr.s rename : usr/src/uts/i86xpv/sys/hypervisor.h => usr/src/uts/intel/sys/hypervisor.h rename : usr/src/uts/i86xpv/sys/xen_errno.h => usr/src/uts/intel/sys/xen_errno.h
Diffstat (limited to 'usr/src/uts/i86pc/os/startup.c')
-rw-r--r--usr/src/uts/i86pc/os/startup.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/usr/src/uts/i86pc/os/startup.c b/usr/src/uts/i86pc/os/startup.c
index 861c1e0f3e..30864285af 100644
--- a/usr/src/uts/i86pc/os/startup.c
+++ b/usr/src/uts/i86pc/os/startup.c
@@ -521,6 +521,11 @@ static page_t *rd_pages;
struct system_hardware system_hardware;
/*
+ * Is this Solaris instance running in a fully virtualized xVM domain?
+ */
+int xpv_is_hvm = 0;
+
+/*
* Enable some debugging messages concerning memory usage...
*/
static void
@@ -1339,6 +1344,36 @@ startup_kmem(void)
PRM_POINT("startup_kmem() done");
}
+#ifndef __xpv
+/*
+ * If we have detected that we are running in an HVM environment, we need
+ * to prepend the PV driver directory to the module search path.
+ */
+#define HVM_MOD_DIR "/platform/i86hvm/kernel"
+static void
+update_default_path()
+{
+ char *current, *newpath;
+ int newlen;
+
+ /*
+ * We are about to resync with krtld. krtld will reset its
+ * internal module search path iff Solaris has set default_path.
+ * We want to be sure we're prepending this new directory to the
+ * right search path.
+ */
+ current = (default_path == NULL) ? kobj_module_path : default_path;
+
+ newlen = strlen(HVM_MOD_DIR) + strlen(current) + 1;
+ newpath = kmem_alloc(newlen, KM_SLEEP);
+ (void) strcpy(newpath, HVM_MOD_DIR);
+ (void) strcat(newpath, " ");
+ (void) strcat(newpath, current);
+
+ default_path = newpath;
+}
+#endif
+
static void
startup_modules(void)
{
@@ -1355,6 +1390,9 @@ startup_modules(void)
* caused the drv_usecwait to be way too short.
*/
microfind();
+
+ if (xpv_is_hvm)
+ update_default_path();
#endif
/*